Package com.gigaspaces.lrmi
Class BaseClientPeer
java.lang.Object
com.j_spaces.kernel.pool.Resource
com.gigaspaces.lrmi.ConnectionResource
com.gigaspaces.lrmi.BaseClientPeer
- All Implemented Interfaces:
ClientPeer,Peer,IResource
- Direct Known Subclasses:
CPeer
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinalize()Returns the connection URL associated with this peer.intReturns the number of connection retries associated with this peer.longReturns the protocol adapter that created this peer.booleanChecks if the current peer is in 'connected' state.voidsetConnected(boolean connected) voidsetConnectionURL(String connectionURL) voidsetConnectRetries(int connectRetries) Sets the number of connection retries associated with this peer.voidsetObjectId(long objectId) Methods inherited from class com.gigaspaces.lrmi.ConnectionResource
clear, close, disable, getGeneratedTraffic, getMonitoringModule, getReceivedTraffic, isClosedMethods inherited from class com.j_spaces.kernel.pool.Resource
acquire, isAcquired, isFromPool, release, setAcquired, setFromPoolMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.gigaspaces.lrmi.ClientPeer
connect, init, invoke, sendKeepAliveMethods inherited from interface com.gigaspaces.lrmi.Peer
disconnect
-
Constructor Details
-
BaseClientPeer
Constructor.- Parameters:
protocolAdapter- Client's peer adaptor.
-
-
Method Details
-
isConnected
public boolean isConnected()Description copied from interface:PeerChecks if the current peer is in 'connected' state.- Returns:
trueif connected,falseotherwise.
-
setConnected
public void setConnected(boolean connected) -
getProtocolAdapter
Description copied from interface:PeerReturns the protocol adapter that created this peer.- Returns:
- the protocol adapter that created this peer.
-
getConnectionURL
Description copied from interface:ClientPeerReturns the connection URL associated with this peer.- Returns:
- the connection URL associated with this peer.
-
setConnectionURL
- Throws:
MalformedURLExceptionRemoteException
-
getConnectRetries
public int getConnectRetries()Description copied from interface:ClientPeerReturns 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:ClientPeerSets the number of connection retries associated with this peer. -
getObjectId
public long getObjectId() -
setObjectId
public void setObjectId(long objectId) -
finalize
-