org.jdiameter.server.impl
Class MutablePeerTableImpl
java.lang.Object
org.jdiameter.client.impl.controller.PeerTableImpl
org.jdiameter.server.impl.MutablePeerTableImpl
- All Implemented Interfaces:
- org.jdiameter.api.ConfigurationListener, org.jdiameter.api.MutablePeerTable, org.jdiameter.api.PeerTable, org.jdiameter.api.Wrapper, IPeerTable, IMutablePeerTable
public class MutablePeerTableImpl
- extends PeerTableImpl
- implements IMutablePeerTable, org.jdiameter.api.ConfigurationListener
|
Method Summary |
org.jdiameter.api.Peer |
addPeer(org.jdiameter.api.URI peerURI,
java.lang.String realm,
boolean connecting)
|
protected org.jdiameter.api.Peer |
createPeer(int rating,
java.lang.String uri,
org.jdiameter.api.MetaData metaData,
org.jdiameter.api.Configuration globalConfig,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory transportFactory,
IMessageParser parser)
|
boolean |
elementChanged(int i,
java.lang.Object data)
|
java.util.Set<org.jdiameter.api.Realm> |
getAllRealms()
|
java.util.concurrent.ConcurrentHashMap<java.lang.String,PeerImpl.Entry> |
getIncConnections()
|
java.util.Set<org.jdiameter.api.URI> |
getPredefinedPeerTable()
|
ISessionFactory |
getSessionFactory()
Return instance of session factory |
org.jdiameter.api.Statistic |
getStatistic(java.lang.String name)
|
IMessage |
isDuplicate(IMessage request)
Check message on duplicate |
boolean |
isDuplicateProtection()
|
boolean |
isWrapperFor(java.lang.Class<?> aClass)
|
org.jdiameter.api.Peer |
removePeer(java.lang.String uri)
|
void |
saveToDuplicate(java.lang.String key,
IMessage answer)
Save message to duplicate storage |
void |
setPeerTableListener(org.jdiameter.api.PeerTableListener peerTableListener)
|
void |
start()
Start peer manager ( start network activity ) |
void |
stopping()
Run stopping oricedure (unsynchronized) |
|
unwrap(java.lang.Class<T> aClass)
|
void |
updatePeerTableEntry(java.lang.String oldName,
org.jdiameter.api.URI oldUri,
java.lang.String newName,
org.jdiameter.api.URI newUri)
|
| Methods inherited from class org.jdiameter.client.impl.controller.PeerTableImpl |
addSessionReqListener, destroy, getPeer, getPeerByName, getPeerByUri, getPeerTable, getSessionReqListeners, init, removeSessionListener, sendMessage, setAssempler, stopped |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jdiameter.api.PeerTable |
getPeer, getPeerTable |
| Methods inherited from interface org.jdiameter.api.PeerTable |
getPeer, getPeerTable |
config
protected org.jdiameter.api.Configuration config
sessionFactory
protected ISessionFactory sessionFactory
fsmFactory
protected IFsmFactory fsmFactory
transportFactory
protected ITransportLayerFactory transportFactory
parser
protected IMessageParser parser
router
protected IRouter router
duplicateProtection
protected boolean duplicateProtection
duplicateTimer
protected long duplicateTimer
dupliocationScheduler
protected java.util.concurrent.ScheduledExecutorService dupliocationScheduler
duplicationHandler
protected java.util.concurrent.ScheduledFuture duplicationHandler
storageAnswers
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,MutablePeerTableImpl.StorageEntry> storageAnswers
isAcceptUndefinedPeer
protected boolean isAcceptUndefinedPeer
incConnections
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,PeerImpl.Entry> incConnections
networkGuard
protected INetWorkGuard networkGuard
network
protected INetwork network
predefinedPeerTable
protected java.util.Set<org.jdiameter.api.URI> predefinedPeerTable
ovrManager
protected IOverloadManager ovrManager
overloadScheduler
protected java.util.concurrent.ScheduledExecutorService overloadScheduler
overloadHandler
protected java.util.concurrent.ScheduledFuture overloadHandler
alias
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.String> alias
MutablePeerTableImpl
public MutablePeerTableImpl(org.jdiameter.api.Configuration config,
org.jdiameter.api.MetaData metaData,
IRouter router,
ISessionFactory sessionFactory,
IFsmFactory fsmFactory,
ITransportLayerFactory trFactory,
IMessageParser parser,
INetwork network,
IOverloadManager ovrManager)
createPeer
protected org.jdiameter.api.Peer createPeer(int rating,
java.lang.String uri,
org.jdiameter.api.MetaData metaData,
org.jdiameter.api.Configuration globalConfig,
org.jdiameter.api.Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory transportFactory,
IMessageParser parser)
throws org.jdiameter.api.InternalException,
TransportException,
java.net.URISyntaxException,
java.net.UnknownServiceException
- Overrides:
createPeer in class PeerTableImpl
- Throws:
org.jdiameter.api.InternalException
TransportException
java.net.URISyntaxException
java.net.UnknownServiceException
setPeerTableListener
public void setPeerTableListener(org.jdiameter.api.PeerTableListener peerTableListener)
- Specified by:
setPeerTableListener in interface org.jdiameter.api.MutablePeerTable
elementChanged
public boolean elementChanged(int i,
java.lang.Object data)
- Specified by:
elementChanged in interface org.jdiameter.api.ConfigurationListener
isDuplicateProtection
public boolean isDuplicateProtection()
start
public void start()
throws org.jdiameter.api.IllegalDiameterStateException,
java.io.IOException
- Description copied from interface:
IPeerTable
- Start peer manager ( start network activity )
- Specified by:
start in interface IPeerTable- Overrides:
start in class PeerTableImpl
- Throws:
org.jdiameter.api.IllegalDiameterStateException
java.io.IOException
getPredefinedPeerTable
public java.util.Set<org.jdiameter.api.URI> getPredefinedPeerTable()
getIncConnections
public java.util.concurrent.ConcurrentHashMap<java.lang.String,PeerImpl.Entry> getIncConnections()
updatePeerTableEntry
public void updatePeerTableEntry(java.lang.String oldName,
org.jdiameter.api.URI oldUri,
java.lang.String newName,
org.jdiameter.api.URI newUri)
stopping
public void stopping()
- Description copied from interface:
IPeerTable
- Run stopping oricedure (unsynchronized)
- Specified by:
stopping in interface IPeerTable- Overrides:
stopping in class PeerTableImpl
addPeer
public org.jdiameter.api.Peer addPeer(org.jdiameter.api.URI peerURI,
java.lang.String realm,
boolean connecting)
- Specified by:
addPeer in interface org.jdiameter.api.MutablePeerTable
getAllRealms
public java.util.Set<org.jdiameter.api.Realm> getAllRealms()
removePeer
public org.jdiameter.api.Peer removePeer(java.lang.String uri)
- Specified by:
removePeer in interface org.jdiameter.api.MutablePeerTable
getStatistic
public org.jdiameter.api.Statistic getStatistic(java.lang.String name)
- Specified by:
getStatistic in interface org.jdiameter.api.MutablePeerTable
isDuplicate
public IMessage isDuplicate(IMessage request)
- Description copied from interface:
IMutablePeerTable
- Check message on duplicate
- Specified by:
isDuplicate in interface IMutablePeerTable
- Parameters:
request - checked message
- Returns:
- true if messahe has duplicate into storage
saveToDuplicate
public void saveToDuplicate(java.lang.String key,
IMessage answer)
- Description copied from interface:
IMutablePeerTable
- Save message to duplicate storage
- Specified by:
saveToDuplicate in interface IMutablePeerTable
- Parameters:
key - key of messageanswer - message
getSessionFactory
public ISessionFactory getSessionFactory()
- Description copied from interface:
IMutablePeerTable
- Return instance of session factory
- Specified by:
getSessionFactory in interface IMutablePeerTable
- Returns:
- instance of session factory
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> aClass)
throws org.jdiameter.api.InternalException
- Specified by:
isWrapperFor in interface org.jdiameter.api.Wrapper- Overrides:
isWrapperFor in class PeerTableImpl
- Throws:
org.jdiameter.api.InternalException
unwrap
public <T> T unwrap(java.lang.Class<T> aClass)
throws org.jdiameter.api.InternalException
- Specified by:
unwrap in interface org.jdiameter.api.Wrapper- Overrides:
unwrap in class PeerTableImpl
- Throws:
org.jdiameter.api.InternalException
Copyright © 2008. All Rights Reserved.