Class BaseClientPeer

All Implemented Interfaces:
ClientPeer, Peer, IResource
Direct Known Subclasses:
CPeer

public abstract class BaseClientPeer extends ConnectionResource
BaseClientPeer is a convenient abstract superclass for Client Peer classes of Protocol Adapters. Concrete subclasses should at least implement connect(), disconnect() and invoke().
Since:
4.0
Author:
Igor Goldenberg
  • Constructor Details

    • BaseClientPeer

      public BaseClientPeer(ProtocolAdapter protocolAdapter)
      Constructor.
      Parameters:
      protocolAdapter - Client's peer adaptor.
  • Method Details

    • isConnected

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

      public void setConnected(boolean connected)
    • getProtocolAdapter

      public ProtocolAdapter getProtocolAdapter()
      Description copied from interface: Peer
      Returns the protocol adapter that created this peer.
      Returns:
      the protocol adapter that created this peer.
    • getConnectionURL

      public String getConnectionURL()
      Description copied from interface: ClientPeer
      Returns the connection URL associated with this peer.
      Returns:
      the connection URL associated with this peer.
    • setConnectionURL

      public void setConnectionURL(String connectionURL) throws MalformedURLException, RemoteException
      Throws:
      MalformedURLException
      RemoteException
    • getConnectRetries

      public int getConnectRetries()
      Description copied from interface: ClientPeer
      Returns the number of connection retries associated with this peer.
      Returns:
      the number of connection retries associated with this peer.
    • setConnectRetries

      public void setConnectRetries(int connectRetries)
      Description copied from interface: ClientPeer
      Sets the number of connection retries associated with this peer.
    • getObjectId

      public long getObjectId()
    • setObjectId

      public void setObjectId(long objectId)
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable