Class BaseServerPeer

java.lang.Object
com.gigaspaces.lrmi.BaseServerPeer
All Implemented Interfaces:
Peer, ServerPeer
Direct Known Subclasses:
SPeer

public class BaseServerPeer extends Object implements ServerPeer
BaseServerPeer is a convenient superclass for Server Peer classes of Protocol Adapters.
Since:
4.0
Author:
Igor Goldenberg
  • Constructor Details

    • BaseServerPeer

      public BaseServerPeer(PAdapter protocolAdapter, long objectId, ClassLoader objectClassLoader, String serviceDetails)
  • Method Details

    • isConnected

      public boolean isConnected()
      Description copied from interface: Peer
      Checks if the current peer is in 'connected' state.
      Specified by:
      isConnected in interface Peer
      Returns:
      true if connected, false otherwise.
    • disconnect

      public void disconnect()
      Description copied from interface: Peer
      Disconnects, effectively closes the connection.
      Specified by:
      disconnect in interface Peer
    • getSecurityContext

      public Object getSecurityContext()
    • setSecurityContext

      public void setSecurityContext(Object securityContext)
    • getTimeout

      public int getTimeout()
    • setTimeout

      public void setTimeout(int timeout)
    • getProtocolAdapter

      public PAdapter getProtocolAdapter()
      Description copied from interface: Peer
      Returns the protocol adapter that created this peer.
      Specified by:
      getProtocolAdapter in interface Peer
      Returns:
      the protocol adapter that created this peer.
    • getObjectId

      public long getObjectId()
      Description copied from interface: ServerPeer
      Returns the object id of the remote object that this peer serves.
      Specified by:
      getObjectId in interface ServerPeer
      Returns:
      the object id of the remote object that this peer serves.
    • getObjectClassLoaderId

      public long getObjectClassLoaderId()
      Specified by:
      getObjectClassLoaderId in interface ServerPeer
    • beforeExport

      public void beforeExport(ITransportConfig config) throws RemoteException
      Description copied from interface: ServerPeer
      Provides a chance to this peer to do initialization before the remote object it serves is exported.
      Specified by:
      beforeExport in interface ServerPeer
      Throws:
      RemoteException
    • afterUnexport

      public void afterUnexport(boolean force) throws RemoteException
      Description copied from interface: ServerPeer
      Provides a chance to this peer to do initialization after the remote object it serves is unexported.
      Specified by:
      afterUnexport in interface ServerPeer
      Parameters:
      force - if , the object has been unexported even if it was in the middle of serving client requests
      Throws:
      RemoteException
    • getConnectionURL

      public String getConnectionURL()
      Description copied from interface: ServerPeer
      Returns a connection URL for the remote object represented by this peer.
      Specified by:
      getConnectionURL in interface ServerPeer
      Returns:
      a connection URL for the remote object represented by this peer.