Package com.softwareag.entirex.aci
Interface ServerImplementation
-
public interface ServerImplementationThis interface may be implemented by server classes which implement the programs of a library. Second, this interface can be used to implement custom methods for initialization and shutdown of the server. These methods can deal with connections to other components like databases.- Since:
- 7.1.1.50
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseConversation(boolean commit)Method called by the RPC Server when a conversation RPC ends.
The parameter indicates that the RPC client has closed the conversation with the option commit.voidfinish()Called on termination of a worker thread.voidinit()Called on start by the Java RPC server.voidshutdown()Called on shutdown by the Java RPC server.
-
-
-
Method Detail
-
closeConversation
void closeConversation(boolean commit)
Method called by the RPC Server when a conversation RPC ends.
The parameter indicates that the RPC client has closed the conversation with the option commit. Otherwise the commit option has not been specified by the RPC client or the conversation has been terminated abnormally.
Implement this method in your server class.- Parameters:
commit-trueif closeConversationCommit has been called by RPC client,falseotherwise- Since:
- EntireX 7.1.1.50
-
init
void init() throws java.lang.Exception
Called on start by the Java RPC server. Create a class implementing this interface. The server reads the name of the class from the configuration, instantiates the class and calls this method on start-up. If this method throws an exception, the stack trace is written to the log file or toSystem.out. In this case the server does not start.
The invocation of this method is not synchronized.- Throws:
java.lang.Exception- if the method fails.
-
shutdown
void shutdown() throws java.lang.ExceptionCalled on shutdown by the Java RPC server. Create a class implementing this interface. The server uses the same instance as for theinit()and calls this method on shutdown. If this method throws an exception, the stack trace is written to the log file or toSystem.out. In this case the shutdown proceeds.
The invocation of this method is not synchronized. If theinitstarts any threads,shutdownmust stop these threads. Otherwise, the Java RPC server will not terminate.- Throws:
java.lang.Exception- if the method fails.
-
finish
void finish() throws java.lang.ExceptionCalled on termination of a worker thread. If a server class implements this interface, this method is called when a worker thread of the Java RPC server terminates. If this method throws an exception, the stack trace is written to the log file or toSystem.out. This method is called once for each worker thread and each server class of this worker thread.- Throws:
java.lang.Exception- if the method fails.
-
-