Package com.gigaspaces.lrmi
Class BaseServerPeer
java.lang.Object
com.gigaspaces.lrmi.BaseServerPeer
- All Implemented Interfaces:
Peer,ServerPeer
- Direct Known Subclasses:
SPeer
BaseServerPeer is a convenient superclass for Server Peer classes of Protocol Adapters.
- Since:
- 4.0
- Author:
- Igor Goldenberg
-
Constructor Summary
ConstructorsConstructorDescriptionBaseServerPeer(PAdapter protocolAdapter, long objectId, ClassLoader objectClassLoader, String serviceDetails) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterUnexport(boolean force) Provides a chance to this peer to do initialization after the remote object it serves is unexported.voidbeforeExport(ITransportConfig config) Provides a chance to this peer to do initialization before the remote object it serves is exported.voidDisconnects, effectively closes the connection.Returns a connection URL for the remote object represented by this peer.longlongReturns the object id of the remote object that this peer serves.Returns the protocol adapter that created this peer.intbooleanChecks if the current peer is in 'connected' state.voidsetSecurityContext(Object securityContext) voidsetTimeout(int timeout)
-
Constructor Details
-
BaseServerPeer
public BaseServerPeer(PAdapter protocolAdapter, long objectId, ClassLoader objectClassLoader, String serviceDetails)
-
-
Method Details
-
isConnected
public boolean isConnected()Description copied from interface:PeerChecks if the current peer is in 'connected' state.- Specified by:
isConnectedin interfacePeer- Returns:
trueif connected,falseotherwise.
-
disconnect
public void disconnect()Description copied from interface:PeerDisconnects, effectively closes the connection.- Specified by:
disconnectin interfacePeer
-
getSecurityContext
-
setSecurityContext
-
getTimeout
public int getTimeout() -
setTimeout
public void setTimeout(int timeout) -
getProtocolAdapter
Description copied from interface:PeerReturns the protocol adapter that created this peer.- Specified by:
getProtocolAdapterin interfacePeer- Returns:
- the protocol adapter that created this peer.
-
getObjectId
public long getObjectId()Description copied from interface:ServerPeerReturns the object id of the remote object that this peer serves.- Specified by:
getObjectIdin interfaceServerPeer- Returns:
- the object id of the remote object that this peer serves.
-
getObjectClassLoaderId
public long getObjectClassLoaderId()- Specified by:
getObjectClassLoaderIdin interfaceServerPeer
-
beforeExport
Description copied from interface:ServerPeerProvides a chance to this peer to do initialization before the remote object it serves is exported.- Specified by:
beforeExportin interfaceServerPeer- Throws:
RemoteException
-
afterUnexport
Description copied from interface:ServerPeerProvides a chance to this peer to do initialization after the remote object it serves is unexported.- Specified by:
afterUnexportin interfaceServerPeer- Parameters:
force- if, the object has been unexported even if it was in the middle of serving client requests- Throws:
RemoteException
-
getConnectionURL
Description copied from interface:ServerPeerReturns a connection URL for the remote object represented by this peer.- Specified by:
getConnectionURLin interfaceServerPeer- Returns:
- a connection URL for the remote object represented by this peer.
-