Package com.gigaspaces.lrmi
Interface ServerPeer
- All Superinterfaces:
Peer
- All Known Implementing Classes:
BaseServerPeer,SPeer
ServerPeer extends Peer with server-specific operations.
An instance of a ServerPeer represents the binding of a remote object to the protocol abstracted
by the peer's originating protocol adapter.
The peer instance is usually constructed by the protocol adapter getServerPeer() method, where it
also receives the remote object id.
The beforeExport() and afterUnexport() methods enable the peer to synchronize its behavior, and
can also server as a hint for the protocol adapter to open new physical connections or close
existing ones.
- Since:
- 4.0
- Author:
- Igor Goldenberg
-
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.Returns a connection URL for the remote object represented by this peer.longlongReturns the object id of the remote object that this peer serves.Methods inherited from interface com.gigaspaces.lrmi.Peer
disconnect, getProtocolAdapter, isConnected
-
Method Details
-
getObjectId
long getObjectId()Returns the object id of the remote object that this peer serves.- Returns:
- the object id of the remote object that this peer serves.
-
getObjectClassLoaderId
long getObjectClassLoaderId() -
beforeExport
Provides a chance to this peer to do initialization before the remote object it serves is exported.- Parameters:
props- the properties provided by the export caller- Throws:
RemoteException
-
afterUnexport
Provides a chance to this peer to do initialization after the remote object it serves is unexported.- Parameters:
force- if, the object has been unexported even if it was in the middle of serving client requests- Throws:
RemoteException
-
getConnectionURL
String getConnectionURL()Returns a connection URL for the remote object represented by this peer.- Returns:
- a connection URL for the remote object represented by this peer.
-