Class JMapConnection

java.lang.Object
com.kheops.jmap.net.JMapConnection
Direct Known Subclasses:
JMapBaseNetworkConnection, JMapInProcessConnection, JMapPooledNetworkConnection, JMSConnectionService

public abstract class JMapConnection extends Object
This abstract class represents a connection between a client application and JMapServer. Subclasses must implement the communication services.
  • Constructor Details

    • JMapConnection

      public JMapConnection()
  • Method Details

    • executeRequest

      public abstract JMapResponse executeRequest(JMapRequest request) throws IOException
      Blocking method that sends a request to JMapServer and returns the response object obtained from JMapServer.
      Parameters:
      request - the request to send to JMapServer
      Returns:
      the response from JMapServer
      Throws:
      IOException
    • executeRequest

      public abstract byte[] executeRequest(byte[] requestBytes) throws IOException
      Blocking method that sends a pre-serialized request (byte array) to JMapServer and returns the serialized response object (byte array) obtained from JMapServer.
      Parameters:
      requestBytes - the request bytes to send to JMapServer
      Returns:
      the response from JMapServer
      Throws:
      IOException
    • pushRequest

      public abstract void pushRequest(JMapRequest request)
      Non-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 its callback method.
      Parameters:
      request - the request to send to JMapServer
      See Also:
    • isConnected

      public abstract boolean isConnected()
    • pingServer

      public boolean pingServer()
    • close

      public abstract void close()
      Closes the current connection.