Package org.serviceconnector.net.req
Class SCRequester
java.lang.Object
org.serviceconnector.net.req.SCRequester
- All Implemented Interfaces:
IRequester
The Class Requester. Implements a general behavior of a requester in the context of the Client or the Server. Defines how to connect/disconnect, send/receive has to process.
Handling of large request/response is defined on this level.
- Author:
- JTraber
-
Constructor Summary
ConstructorsConstructorDescriptionSCRequester(RemoteNodeConfiguration remoteNodeConfiguration, int keepAliveTimeoutMillis) Instantiates a new requester. -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroy.Gets the context.Gets the sCMP msg sequence nr.voidsend(SCMPMessage message, int timeoutMillis, ISCMPMessageCallback scmpCallback) Send and receive response asynchronous.
-
Constructor Details
-
SCRequester
Instantiates a new requester.- Parameters:
remoteNodeConfiguration- the remote node configuration
-
-
Method Details
-
send
public void send(SCMPMessage message, int timeoutMillis, ISCMPMessageCallback scmpCallback) throws Exception Send and receive response asynchronous.- Specified by:
sendin interfaceIRequester- Parameters:
message- the scmptimeoutMillis- the timeout in secondsscmpCallback- the callback- Throws:
Exception- exception in sending/receiving process
-
getRemoteNodeConfiguration
Gets the context.- Specified by:
getRemoteNodeConfigurationin interfaceIRequester- Returns:
- the context
-
destroy
public void destroy()Destroy.- Specified by:
destroyin interfaceIRequester
-
getSCMPMsgSequenceNr
Gets the sCMP msg sequence nr.- Returns:
- the sCMP msg sequence nr
-