Interface ProtocolAdapter<C extends ClientPeer>

All Known Implementing Classes:
PAdapter

public interface ProtocolAdapter<C extends ClientPeer>
A Protocol Adapter abstracts a specific communication protocol.

Each protocol has a unique name in an LRMI environment, and this name serves as the key to the LRMI Registry.

The protocol adapter implementation is a factory of ClientPeer and ServerPeer instances. A pair of a ClientPeer and ServerPeer represent a logical LRMI connection. Implementations may share physical connections.

A protocol is initialized by a set of properties, which serve as the basic configuration mechanism.

Since:
4.0
Author:
Igor Goldenberg
  • Method Details

    • init

      void init(ITransportConfig config, ProtocolAdapter.Side side) throws IOException
      Initializes the protocol adapter according to the supplied properties.
      Throws:
      RemoteException - if init. failed.
      IOException
    • getName

      String getName()
      Returns the unique name of this protocol adapter.
      Returns:
      the unique name of this protocol adapter.
    • getClientPeer

      C getClientPeer(PlatformLogicalVersion serviceVersion)
      Returns an un-connected client peer.
    • newServerPeer

      ServerPeer newServerPeer(long objectId, ClassLoader objectClassLoader, String serviceDetails)
      Construct and returns a server peer for the specified object id.
      Parameters:
      objectId - The exported remote objectId.
      objectClassLoader - the exported object class loader
    • getRemoteObjectConnectionsList

      List<ITransportConnection> getRemoteObjectConnectionsList(long objectId)
      Parameters:
      objectId - The exported remote objectId.
      Returns:
      the Transport connection info list for the supplied remote objectID.
    • countRemoteObjectConnections

      int countRemoteObjectConnections(long objectId)
    • getClassProvider

      IClassProvider getClassProvider()
    • getPort

      int getPort()
    • getHostName

      String getHostName()
    • shutdown

      void shutdown()
      Shutdown this Protocol Adapter, freeing excess resources.
    • getClientInvocationHandler

      ClientPeerInvocationHandler getClientInvocationHandler(String connectionURL, ITransportConfig config, PlatformLogicalVersion serviceVersion)
      Returns the remote method invocation handler ClientPeerInvocationHandler which represents remote object specified by the supplied c and connection URL. The returned ClientPeerInvocationHandler maintains a pool of connections(sockets) to the remote object.
      Parameters:
      connectionURL - the connectionURL to the remoteObj provided by ServerPeer.
      config - the client configuration.
      Returns:
      the remote method invocation handler.
    • getMonitoringDetails

      LRMIMonitoringDetails getMonitoringDetails()