Package com.gigaspaces.lrmi
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
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionintcountRemoteObjectConnections(long objectId) getClientInvocationHandler(String connectionURL, ITransportConfig config, PlatformLogicalVersion serviceVersion) Returns the remote method invocation handlerClientPeerInvocationHandlerwhich represents remote object specified by the supplied c and connection URL.getClientPeer(PlatformLogicalVersion serviceVersion) Returns an un-connected client peer.getName()Returns the unique name of this protocol adapter.intgetPort()getRemoteObjectConnectionsList(long objectId) voidinit(ITransportConfig config, ProtocolAdapter.Side side) Initializes the protocol adapter according to the supplied properties.newServerPeer(long objectId, ClassLoader objectClassLoader, String serviceDetails) Construct and returns a server peer for the specified object id.voidshutdown()Shutdown this Protocol Adapter, freeing excess resources.
-
Method Details
-
init
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
Returns an un-connected client peer. -
newServerPeer
Construct and returns a server peer for the specified object id.- Parameters:
objectId- The exported remote objectId.objectClassLoader- the exported object class loader
-
getRemoteObjectConnectionsList
- 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 handlerClientPeerInvocationHandlerwhich represents remote object specified by the supplied c and connection URL. The returnedClientPeerInvocationHandlermaintains a pool of connections(sockets) to the remote object.- Parameters:
connectionURL- the connectionURL to the remoteObj provided byServerPeer.config- the client configuration.- Returns:
- the remote method invocation handler.
-
getMonitoringDetails
LRMIMonitoringDetails getMonitoringDetails()
-