public class PeerTableImpl extends Object implements IPeerTable
| Modifier and Type | Class and Description |
|---|---|
protected class |
PeerTableImpl.PeerTableThreadFactory |
| Modifier and Type | Field and Description |
|---|---|
protected IAssembler |
assembler |
protected IConcurrentFactory |
concurrentFactory |
protected Dictionary |
dictionary |
protected boolean |
isStarted |
protected MetaData |
metaData |
protected ConcurrentHashMap<String,Peer> |
peerTable |
protected IRouter |
router |
protected ISessionDatasource |
sessionDatasource |
protected long |
stopTimeOut |
| Modifier | Constructor and Description |
|---|---|
protected |
PeerTableImpl() |
|
PeerTableImpl(Configuration globalConfig,
MetaData metaData,
IContainer stack,
IRouter router,
IFsmFactory fsmFactory,
ITransportLayerFactory transportFactory,
IStatisticManager statisticFactory,
IConcurrentFactory concurrentFactory,
IMessageParser parser) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSessionReqListener(String sessionId,
NetworkReqListener listener)
Register session lister
|
protected Peer |
createPeer(int rating,
String uri,
String ip,
String portRange,
MetaData metaData,
Configuration config,
Configuration peerConfig,
IFsmFactory fsmFactory,
ITransportLayerFactory transportFactory,
IStatisticManager statisticFactory,
IConcurrentFactory concurrentFactory,
IMessageParser parser) |
void |
destroy()
Destroy all resources
|
IPeer |
getPeer(String fqdn)
Return peer from peer table by identity - FQDN host name.
|
List<Peer> |
getPeerTable() |
Map<String,NetworkReqListener> |
getSessionReqListeners()
Return map of session event listeners
|
protected void |
init(IContainer stack,
IRouter router,
Configuration globalConfig,
MetaData metaData,
IFsmFactory fsmFactory,
ITransportLayerFactory transportFactory,
IStatisticManager statisticFactory,
IConcurrentFactory concurrentFactory,
IMessageParser parser) |
boolean |
isWrapperFor(Class<?> aClass) |
void |
removeSessionListener(String sessionId)
Remove session event listener
|
void |
sendMessage(IMessage message)
Send message to diameter network ( routing procedure )
|
void |
setAssembler(IAssembler assembler)
Set instance assembler
|
void |
start()
Start peer manager ( start network activity )
|
void |
stopped()
Release resources
|
void |
stopping(int disconnectCause)
Run stopping procedure (unsynchronized)
|
<T> T |
unwrap(Class<T> aClass) |
protected ConcurrentHashMap<String,Peer> peerTable
protected boolean isStarted
protected long stopTimeOut
protected IAssembler assembler
protected IRouter router
protected MetaData metaData
protected IConcurrentFactory concurrentFactory
protected ISessionDatasource sessionDatasource
protected final Dictionary dictionary
protected PeerTableImpl()
public PeerTableImpl(Configuration globalConfig, MetaData metaData, IContainer stack, IRouter router, IFsmFactory fsmFactory, ITransportLayerFactory transportFactory, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory, IMessageParser parser)
protected void init(IContainer stack, IRouter router, Configuration globalConfig, MetaData metaData, IFsmFactory fsmFactory, ITransportLayerFactory transportFactory, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory, IMessageParser parser)
protected Peer createPeer(int rating, String uri, String ip, String portRange, MetaData metaData, Configuration config, Configuration peerConfig, IFsmFactory fsmFactory, ITransportLayerFactory transportFactory, IStatisticManager statisticFactory, IConcurrentFactory concurrentFactory, IMessageParser parser) throws InternalException, TransportException, URISyntaxException, UnknownServiceException
public List<Peer> getPeerTable()
getPeerTable in interface PeerTablepublic void sendMessage(IMessage message) throws IllegalDiameterStateException, RouteException, AvpDataException, IOException
IPeerTablesendMessage in interface IPeerTablemessage - message instanceIllegalDiameterStateExceptionRouteExceptionAvpDataExceptionIOExceptionpublic void addSessionReqListener(String sessionId, NetworkReqListener listener)
IPeerTableaddSessionReqListener in interface IPeerTablesessionId - session idlistener - listener listenerpublic Map<String,NetworkReqListener> getSessionReqListeners()
IPeerTablegetSessionReqListeners in interface IPeerTablepublic IPeer getPeer(String fqdn)
IPeerTablegetPeer in interface PeerTablegetPeer in interface IPeerTablefqdn - peer hostpublic void removeSessionListener(String sessionId)
IPeerTableremoveSessionListener in interface IPeerTablesessionId - id of sessionpublic void setAssembler(IAssembler assembler)
IPeerTablesetAssembler in interface IPeerTableassembler - assembler instancepublic void start()
throws IllegalDiameterStateException,
IOException
IPeerTablestart in interface IPeerTableIllegalDiameterStateExceptionIOExceptionpublic void stopped()
IPeerTablestopped in interface IPeerTablepublic void stopping(int disconnectCause)
IPeerTablestopping in interface IPeerTablepublic void destroy()
IPeerTabledestroy in interface IPeerTablepublic boolean isWrapperFor(Class<?> aClass) throws InternalException
isWrapperFor in interface WrapperInternalExceptionpublic <T> T unwrap(Class<T> aClass) throws InternalException
unwrap in interface WrapperInternalExceptionCopyright © 2016. All Rights Reserved.