|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdiameter.common.impl.controller.AbstractPeer
org.jdiameter.client.impl.controller.PeerImpl
public class PeerImpl
| Nested Class Summary | |
|---|---|
protected class |
PeerImpl.ActionContext
|
| Field Summary | |
|---|---|
protected static DiameterMessageValidator |
_VALDIATOR_
|
protected java.net.InetAddress[] |
addresses
|
protected java.util.Set<org.jdiameter.api.ApplicationId> |
commonApplications
|
protected IConnection |
connection
|
protected IConnectionListener |
connListener
|
protected int |
firmWare
|
protected IStateMachine |
fsm
|
protected java.util.concurrent.atomic.AtomicLong |
hopByHopId
|
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 boolean |
useUriAsFQDN
|
protected long |
vendorID
|
| Fields inherited from class org.jdiameter.common.impl.controller.AbstractPeer |
|---|
INT_COMMON_APP_ID, statistic, uid, uri |
| Constructor Summary | |
|---|---|
protected |
PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
java.lang.String ip,
java.lang.String portRange,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser,
IStatisticFactory statisticFactory,
IConcurrentFactory concurrentFactory,
IConnection connection)
|
|
PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
java.lang.String ip,
java.lang.String portRange,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IStatisticFactory statisticFactory,
IConcurrentFactory concurrentFactory,
IMessageParser parser)
|
| 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 |
|
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()
|
|
long |
getHopByHopIdentifier()
Return new hop by hop id for new message |
|
java.net.InetAddress[] |
getIPAddresses()
|
|
java.lang.String |
getProductName()
|
|
int |
getRating()
Return rating of peer |
|
java.lang.String |
getRealmName()
|
|
|
getState(java.lang.Class<E> enumc)
|
|
IStatistic |
getStatistic()
Return peer statistic |
|
org.jdiameter.api.URI |
getUri()
|
|
long |
getVendorId()
|
|
boolean |
handleMessage(EventTypes type,
IMessage message,
java.lang.String key)
Put message to peer fsm |
|
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 org.jdiameter.common.impl.controller.AbstractPeer |
|---|
compareTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final DiameterMessageValidator _VALDIATOR_
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 java.util.concurrent.atomic.AtomicLong 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 final java.util.Map<java.lang.Long,IMessage> peerRequests
protected IStateMachine fsm
protected IMessageParser parser
protected boolean useUriAsFQDN
protected IConnection connection
protected IConnectionListener connListener
| Constructor Detail |
|---|
public PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
java.lang.String ip,
java.lang.String portRange,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IStatisticFactory statisticFactory,
IConcurrentFactory concurrentFactory,
IMessageParser parser)
throws org.jdiameter.api.InternalException,
TransportException
org.jdiameter.api.InternalException
TransportException
protected PeerImpl(PeerTableImpl table,
int rating,
org.jdiameter.api.URI remotePeer,
java.lang.String ip,
java.lang.String portRange,
IMetaData metaData,
org.jdiameter.api.Configuration config,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser,
IStatisticFactory statisticFactory,
IConcurrentFactory concurrentFactory,
IConnection connection)
throws org.jdiameter.api.InternalException,
TransportException
org.jdiameter.api.InternalException
TransportException| Method Detail |
|---|
public IContext getContext()
public IStatistic getStatistic()
IPeer
getStatistic in interface IPeerpublic 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 long 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 handleMessage(EventTypes type,
IMessage message,
java.lang.String key)
throws TransportException,
org.jdiameter.api.OverloadException,
org.jdiameter.api.InternalException
IPeer
handleMessage in interface IPeermessage - request instance
TransportException
org.jdiameter.api.OverloadException
org.jdiameter.api.InternalException
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 getRating()
IPeer
getRating in interface IPeerpublic 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 | |||||||||