Package com.kheops.jmap.net
Class JMapInProcessConnection
java.lang.Object
com.kheops.jmap.net.JMapConnection
com.kheops.jmap.net.JMapInProcessConnection
This class represents a direct connection between a client application and
 JMapServer running in the same process. It is used to as an abstraction layer
 to uniformize the communications with JMapServer running either in the same
 process or somewhere on a network.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancancelRequest(JMapRequest pushedRequest) Method that cancels a previously pushed request.voidclose()This method has no effect on this connection.static ObjectdeserializeObject(byte[] bytes) byte[]executeRequest(byte[] requestBytes) Blocking method that sends a pre-serialized request (byte array) to JMapServer and returns the serialized response object (byte array) obtained from JMapServer.executeRequest(JMapRequest request) Blocking method that sends a request to JMapServer and returns the response object obtained from JMapServer.booleanvoidpushRequest(JMapRequest request) Non-blocking method that pushes a request in the queue.Methods inherited from class com.kheops.jmap.net.JMapConnectionpingServer
- 
Constructor Details- 
JMapInProcessConnection
 
- 
- 
Method Details- 
pushRequestNon-blocking method that pushes a request in the queue. Requests placed in the queue are sent to JMapServer one after the other. When the response is obtained from JMapServer, the client specified in the request object is notified through itscallbackmethod.- Specified by:
- pushRequestin class- JMapConnection
- Parameters:
- request- the request to send to JMapServer
- See Also:
 
- 
executeRequestBlocking method that sends a request to JMapServer and returns the response object obtained from JMapServer.- Specified by:
- executeRequestin class- JMapConnection
- Parameters:
- request- the request to send to JMapServer
- Returns:
- the response from JMapServer
 
- 
cancelRequestMethod that cancels a previously pushed request. The request will be cancelled ONLY if it is NOT currently in execution.- Parameters:
- pushedRequest-
- Returns:
- true if the cancel was successful
 
- 
executeRequestBlocking method that sends a pre-serialized request (byte array) to JMapServer and returns the serialized response object (byte array) obtained from JMapServer.- Specified by:
- executeRequestin class- JMapConnection
- Parameters:
- requestBytes- the request to send to JMapServer
- Returns:
- the response from JMapServer
- Throws:
- IOException- if a serialization error occurs.
 
- 
deserializeObject- Throws:
- IOException
 
- 
isConnectedpublic boolean isConnected()- Specified by:
- isConnectedin class- JMapConnection
 
- 
closepublic void close()This method has no effect on this connection.- Specified by:
- closein class- JMapConnection
 
 
-