|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdiameter.client.impl.controller.PeerImpl
public class PeerImpl
| Nested Class Summary | |
|---|---|
protected class |
PeerImpl.ActionContext
|
| Field Summary | |
|---|---|
protected java.net.InetAddress[] |
addresses
|
protected java.util.Set<org.jdiameter.api.ApplicationId> |
commonApplications
|
protected IConnection |
conn
|
protected IConnectionListener |
connListener
|
protected int |
firmWare
|
protected IStateMachine |
fsm
|
protected org.jdiameter.api.app.StateChangeListener |
fsmListener
|
protected int |
hopByHopId
|
static int |
INT_COMMON_APP_ID
|
protected java.util.logging.Logger |
logger
|
protected IMetaData |
metaData
|
protected IMessageParser |
parser
|
protected java.util.Map<java.lang.Long,IMessage> |
peerRequests
|
protected java.lang.String |
productName
|
protected int |
rating
|
protected java.lang.String |
realmName
|
protected IRouter |
router
|
protected java.util.Map<java.lang.String,org.jdiameter.api.NetworkReqListener> |
slc
|
protected boolean |
stopping
|
protected PeerTableImpl |
table
|
protected static UIDGenerator |
uid
|
protected org.jdiameter.api.URI |
uri
|
protected boolean |
useUriAsFQDN
|
protected long |
vendorID
|
| Constructor Summary | |
|---|---|
|
PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser)
|
protected |
PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser,
IConnection connection)
|
| Method Summary | ||
|---|---|---|
void |
addConnectionListener(IConnectionListener listener)
Add connection state change listener |
|
void |
addMessage(IMessage message)
Append request to peer request storage map |
|
void |
addPeerStateListener(org.jdiameter.api.PeerStateListener listener)
|
|
void |
addStateChangeListener(org.jdiameter.api.app.StateChangeListener listener)
Add state change listener |
|
int |
compareTo(org.jdiameter.api.Peer o)
|
|
void |
connect()
|
|
void |
disconnect()
|
|
protected void |
fillIPAddressTable(IMessage message)
|
|
protected java.util.Set<org.jdiameter.api.ApplicationId> |
getCommonApplicationIds(IMessage message)
|
|
java.util.Set<org.jdiameter.api.ApplicationId> |
getCommonApplications()
|
|
IContext |
getContext()
|
|
long |
getFirmware()
|
|
int |
getHopByHopIdentifier()
Return new hop by hop id for new message |
|
java.net.InetAddress[] |
getIPAddresses()
|
|
java.lang.String |
getProductName()
|
|
int |
getRaiting()
Return rating of pee |
|
java.lang.String |
getRealmName()
|
|
|
getState(java.lang.Class<E> enumc)
|
|
org.jdiameter.api.URI |
getUri()
|
|
long |
getVendorId()
|
|
boolean |
hasValidConnection()
Return true if peer has valid connection |
|
protected void |
preProcessRequest(IMessage answer)
|
|
IMessage[] |
remAllMessage()
Clear request storage map |
|
void |
remConnectionListener(IConnectionListener listener)
Remove connection state change listener |
|
void |
remMessage(IMessage message)
Remove request from request storage map |
|
void |
removePeerStateListener(org.jdiameter.api.PeerStateListener listener)
|
|
void |
remStateChangeListener(org.jdiameter.api.app.StateChangeListener listener)
Remove state change listener |
|
boolean |
sendMessage(IMessage message)
Send message to diameter network |
|
void |
setRealm(java.lang.String realm)
Attach peer to realm |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int INT_COMMON_APP_ID
protected static UIDGenerator uid
protected java.util.logging.Logger logger
protected org.jdiameter.api.URI uri
protected java.net.InetAddress[] addresses
protected java.lang.String realmName
protected long vendorID
protected java.lang.String productName
protected int firmWare
protected java.util.Set<org.jdiameter.api.ApplicationId> commonApplications
protected int hopByHopId
protected int rating
protected boolean stopping
protected IMetaData metaData
protected PeerTableImpl table
protected IRouter router
protected java.util.Map<java.lang.String,org.jdiameter.api.NetworkReqListener> slc
protected java.util.Map<java.lang.Long,IMessage> peerRequests
protected IStateMachine fsm
protected org.jdiameter.api.app.StateChangeListener fsmListener
protected IMessageParser parser
protected boolean useUriAsFQDN
protected IConnection conn
protected IConnectionListener connListener
| Constructor Detail |
|---|
public PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser)
throws org.jdiameter.api.InternalException,
TransportException
org.jdiameter.api.InternalException
TransportException
protected PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser,
IConnection connection)
throws org.jdiameter.api.InternalException,
TransportException
org.jdiameter.api.InternalException
TransportException| Method Detail |
|---|
public IContext getContext()
public void addPeerStateListener(org.jdiameter.api.PeerStateListener listener)
addPeerStateListener in interface org.jdiameter.api.Peerpublic void removePeerStateListener(org.jdiameter.api.PeerStateListener listener)
removePeerStateListener in interface org.jdiameter.api.Peer
public void connect()
throws org.jdiameter.api.InternalException,
java.io.IOException,
org.jdiameter.api.IllegalDiameterStateException
connect in interface org.jdiameter.api.Peerorg.jdiameter.api.InternalException
java.io.IOException
org.jdiameter.api.IllegalDiameterStateException
public void disconnect()
throws org.jdiameter.api.InternalException,
org.jdiameter.api.IllegalDiameterStateException
disconnect in interface org.jdiameter.api.Peerorg.jdiameter.api.InternalException
org.jdiameter.api.IllegalDiameterStateExceptionpublic <E> E getState(java.lang.Class<E> enumc)
getState in interface org.jdiameter.api.Peerpublic org.jdiameter.api.URI getUri()
getUri in interface org.jdiameter.api.Peerpublic java.net.InetAddress[] getIPAddresses()
getIPAddresses in interface org.jdiameter.api.Peerpublic java.lang.String getRealmName()
getRealmName in interface org.jdiameter.api.Peerpublic long getVendorId()
getVendorId in interface org.jdiameter.api.Peerpublic java.lang.String getProductName()
getProductName in interface org.jdiameter.api.Peerpublic long getFirmware()
getFirmware in interface org.jdiameter.api.Peerpublic java.util.Set<org.jdiameter.api.ApplicationId> getCommonApplications()
getCommonApplications in interface org.jdiameter.api.Peerpublic int getHopByHopIdentifier()
IPeer
getHopByHopIdentifier in interface IPeerpublic void addMessage(IMessage message)
IPeer
addMessage in interface IPeermessage - request instancepublic void remMessage(IMessage message)
IPeer
remMessage in interface IPeermessage - request instancepublic IMessage[] remAllMessage()
IPeer
remAllMessage in interface IPeer
public boolean sendMessage(IMessage message)
throws TransportException,
org.jdiameter.api.OverloadException,
org.jdiameter.api.InternalException
IPeer
sendMessage in interface IPeermessage - request instance
TransportException
org.jdiameter.api.OverloadException
org.jdiameter.api.InternalExceptionpublic boolean hasValidConnection()
IPeer
hasValidConnection in interface IPeerpublic void setRealm(java.lang.String realm)
IPeer
setRealm in interface IPeerrealm - realm namepublic void addStateChangeListener(org.jdiameter.api.app.StateChangeListener listener)
IPeer
addStateChangeListener in interface IPeerlistener - listener instancepublic void remStateChangeListener(org.jdiameter.api.app.StateChangeListener listener)
IPeer
remStateChangeListener in interface IPeerlistener - listener instancepublic void addConnectionListener(IConnectionListener listener)
IPeer
addConnectionListener in interface IPeerlistener - listener instancepublic void remConnectionListener(IConnectionListener listener)
IPeer
remConnectionListener in interface IPeerlistener - listener instancepublic int getRaiting()
IPeer
getRaiting in interface IPeerpublic int compareTo(org.jdiameter.api.Peer o)
compareTo in interface java.lang.Comparable<org.jdiameter.api.Peer>public java.lang.String toString()
toString in class java.lang.Objectprotected void fillIPAddressTable(IMessage message)
protected java.util.Set<org.jdiameter.api.ApplicationId> getCommonApplicationIds(IMessage message)
protected void preProcessRequest(IMessage answer)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||