Package com.gigaspaces.lrmi.nio
Class PAdapter
java.lang.Object
com.gigaspaces.lrmi.nio.PAdapter
- All Implemented Interfaces:
ProtocolAdapter<CPeer>
An NIO based implementation of LRMI Protocol Adapter
The basic design is as follows:
There will be a single 'pivot' object at the server side, that will act as a local proxy for all
server peers in the server JVM. The pivot is in charge of all connection management and
invocation dispatching. See Pivot documentation for more details.
- Since:
- 4.0
- Author:
- Igor Goldenberg
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.gigaspaces.lrmi.ProtocolAdapter
ProtocolAdapter.Side -
Constructor Summary
Constructors -
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.getPivot()intgetPort()getRemoteObjectConnectionsList(long objectId) voidinit(ITransportConfig config, ProtocolAdapter.Side initSide) 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.
-
Constructor Details
-
PAdapter
public PAdapter()
-
-
Method Details
-
init
Description copied from interface:ProtocolAdapterInitializes the protocol adapter according to the supplied properties.- Specified by:
initin interfaceProtocolAdapter<CPeer>- Throws:
RemoteException- if init. failed.IOException
-
getClassProvider
- Specified by:
getClassProviderin interfaceProtocolAdapter<CPeer>
-
getPort
public int getPort()- Specified by:
getPortin interfaceProtocolAdapter<CPeer>
-
getHostName
- Specified by:
getHostNamein interfaceProtocolAdapter<CPeer>
-
getName
Description copied from interface:ProtocolAdapterReturns the unique name of this protocol adapter.- Specified by:
getNamein interfaceProtocolAdapter<CPeer>- Returns:
- the unique name of this protocol adapter.
-
getBindInetSocketAddress
- Returns:
- the INetSocketAddress this ProtocolAdapter bind to.
-
getClientPeer
Description copied from interface:ProtocolAdapterReturns an un-connected client peer.- Specified by:
getClientPeerin interfaceProtocolAdapter<CPeer>
-
newServerPeer
public ServerPeer newServerPeer(long objectId, ClassLoader objectClassLoader, String serviceDetails) Description copied from interface:ProtocolAdapterConstruct and returns a server peer for the specified object id.- Specified by:
newServerPeerin interfaceProtocolAdapter<CPeer>- Parameters:
objectId- The exported remote objectId.objectClassLoader- the exported object class loader
-
getPivot
-
shutdown
public void shutdown()Description copied from interface:ProtocolAdapterShutdown this Protocol Adapter, freeing excess resources.- Specified by:
shutdownin interfaceProtocolAdapter<CPeer>
-
getRemoteObjectConnectionsList
- Specified by:
getRemoteObjectConnectionsListin interfaceProtocolAdapter<CPeer>- Parameters:
objectId- The exported remote objectId.- Returns:
- the Transport connection info list for the supplied remote objectID.
-
countRemoteObjectConnections
public int countRemoteObjectConnections(long objectId) - Specified by:
countRemoteObjectConnectionsin interfaceProtocolAdapter<CPeer>
-
getClientInvocationHandler
public ClientPeerInvocationHandler getClientInvocationHandler(String connectionURL, ITransportConfig config, PlatformLogicalVersion serviceVersion) Description copied from interface:ProtocolAdapterReturns 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.- Specified by:
getClientInvocationHandlerin interfaceProtocolAdapter<CPeer>- Parameters:
connectionURL- the connectionURL to the remoteObj provided byServerPeer.config- the client configuration.- Returns:
- the remote method invocation handler.
-
getMonitoringDetails
- Specified by:
getMonitoringDetailsin interfaceProtocolAdapter<CPeer>
-