// Accessors for global types
t_type* get_void_type() const { return type_void; }
t_type* get_string_type() const { return type_string; }
- t_type* get_bool_type() const { return type_byte; }
+ t_type* get_bool_type() const { return type_bool; }
t_type* get_byte_type() const { return type_byte; }
t_type* get_i16_type() const { return type_i16; }
t_type* get_i32_type() const { return type_i32; }
{}
Function:
- FunctionType AsyncOptional tok_identifier '(' FieldList ')' ThrowsOptional
+ AsyncOptional FunctionType tok_identifier '(' FieldList ')' ThrowsOptional
{
$5->set_name(std::string($3) + "_args");
- $$ = new t_function($1, $3, $5, $7, $2);
+ $$ = new t_function($2, $3, $5, $7, $1);
y_field_val = -1;
}
/**
* The run method fires up the server and gets things going.
*/
- public abstract void run();
+ public abstract void serve();
}
super(processor, serverTransport);
}
- public void run() {
+ public void serve() {
try {
serverTransport_.listen();
} catch (TTransportException ttx) {
}
- public void run() {
+ public void serve() {
try {
serverTransport_.listen();
} catch (TTransportException ttx) {
}
while (true) {
+ int failureCount = 0;
try {
TTransport client = serverTransport_.accept();
WorkerProcess wp = new WorkerProcess(client);
executorService_.execute(wp);
} catch (TTransportException ttx) {
+ ++failureCount;
ttx.printStackTrace();
- }
+ }
}
}
// Run it
System.out.println("Starting the server on port " + port + "...");
- serverEngine.run();
+ serverEngine.serve();
} catch (Exception x) {
x.printStackTrace();