Package org.jivesoftware.openfire.spi
Class ClientRoute
- java.lang.Object
-
- org.jivesoftware.openfire.spi.ClientRoute
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cacheable
public class ClientRoute extends Object implements Cacheable, Externalizable
Internal object used by RoutingTableImpl to keep track of the node that own a ClientSession and whether the session is available or not.- Author:
- Gaston Dombiak
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClientRoute()
ClientRoute(NodeID nodeID, boolean available)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCachedSize()
Returns the approximate size of the Object in bytes.NodeID
getNodeID()
boolean
isAvailable()
void
readExternal(ObjectInput in)
void
setNodeID(NodeID nodeID)
String
toString()
void
writeExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
ClientRoute
public ClientRoute()
-
ClientRoute
public ClientRoute(NodeID nodeID, boolean available)
-
-
Method Detail
-
getNodeID
public NodeID getNodeID()
-
setNodeID
public void setNodeID(NodeID nodeID)
-
isAvailable
public boolean isAvailable()
-
getCachedSize
public int getCachedSize()
Description copied from interface:Cacheable
Returns the approximate size of the Object in bytes. The size should be considered to be a best estimate of how much memory the Object occupies and may be based on empirical trials or dynamic calculations.- Specified by:
getCachedSize
in interfaceCacheable
- Returns:
- the size of the Object in bytes.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-