Interface ServerPeer

All Superinterfaces:
Peer
All Known Implementing Classes:
BaseServerPeer, SPeer

public interface ServerPeer extends Peer
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 Type
    Method
    Description
    void
    afterUnexport(boolean force)
    Provides a chance to this peer to do initialization after the remote object it serves is unexported.
    void
    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.
    long
     
    long
    Returns 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

      void beforeExport(ITransportConfig config) throws RemoteException
      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

      void afterUnexport(boolean force) throws RemoteException
      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.