public class StackImpl extends Object implements IContainer, StackImplMBean
| Modifier and Type | Field and Description |
|---|---|
protected IAssembler |
assembler |
protected IConcurrentFactory |
concurrentFactory |
protected Configuration |
config |
protected Lock |
lock |
protected IPeerTable |
peerManager |
protected ScheduledExecutorService |
scheduledFacility
Use for processing request time-out tasks (for all active peers)
|
protected StackState |
state |
| Constructor and Description |
|---|
StackImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSessionListener(String sessionId,
NetworkReqListener listener)
Add session listener
|
String |
configuration()
Return string representation of stack instanceconfiguration
|
void |
destroy() |
IAssembler |
getAssemblerFacility()
Return root IOC
|
IConcurrentFactory |
getConcurrentFactory()
Return common concurrent factory
|
Configuration |
getConfiguration()
Return configuration instance
|
Dictionary |
getDictionary() |
Logger |
getLogger() |
MetaData |
getMetaData() |
ScheduledExecutorService |
getScheduledFacility()
Return common Scheduled Executor Service
|
<T extends BaseSession> |
getSession(String sessionId,
Class<T> clazz) |
SessionFactory |
getSessionFactory() |
StackState |
getState()
Return state of stack
|
SessionFactory |
init(Configuration config) |
boolean |
isActive()
Return true if stack is started
|
boolean |
isWrapperFor(Class<?> aClass) |
String |
metaData()
Return string representation of stack instance metadata
|
String |
peerDescription(String name)
Reurn description (include state) of defined peer
|
String |
peerList()
Return list of peer
|
void |
removeSessionListener(String sessionId)
Remove session event listener by sessionId
|
void |
sendMessage(IMessage message)
Send message
|
void |
start()
Run startd procedure
|
void |
start(Mode mode,
long timeOut,
TimeUnit timeUnit) |
void |
stop(int disconnectCause)
Run stop procedure
|
void |
stop(long timeOut,
TimeUnit timeUnit,
int disconnectCause) |
<T> T |
unwrap(Class<T> aClass) |
protected IAssembler assembler
protected IConcurrentFactory concurrentFactory
protected Configuration config
protected IPeerTable peerManager
protected StackState state
protected Lock lock
protected ScheduledExecutorService scheduledFacility
public SessionFactory init(Configuration config) throws IllegalDiameterStateException, InternalException
init in interface StackIllegalDiameterStateExceptionInternalExceptionpublic SessionFactory getSessionFactory() throws IllegalDiameterStateException
getSessionFactory in interface StackIllegalDiameterStateExceptionpublic Dictionary getDictionary() throws IllegalDiameterStateException
getDictionary in interface StackIllegalDiameterStateExceptionpublic void start()
throws IllegalDiameterStateException,
InternalException
StackImplMBeanstart in interface Stackstart in interface StackImplMBeanIllegalDiameterStateExceptionInternalExceptionpublic void start(Mode mode, long timeOut, TimeUnit timeUnit) throws IllegalDiameterStateException, InternalException
start in interface StackIllegalDiameterStateExceptionInternalExceptionpublic void stop(long timeOut,
TimeUnit timeUnit,
int disconnectCause)
throws IllegalDiameterStateException,
InternalException
stop in interface StackIllegalDiameterStateExceptionInternalExceptionpublic boolean isActive()
StackImplMBeanisActive in interface StackisActive in interface StackImplMBeanpublic MetaData getMetaData()
getMetaData in interface Stackpublic <T extends BaseSession> T getSession(String sessionId, Class<T> clazz) throws InternalException
getSession in interface StackInternalExceptionpublic boolean isWrapperFor(Class<?> aClass) throws InternalException
isWrapperFor in interface WrapperInternalExceptionpublic <T> T unwrap(Class<T> aClass) throws InternalException
unwrap in interface WrapperInternalExceptionpublic StackState getState()
IContainergetState in interface IContainerpublic Configuration getConfiguration()
IContainergetConfiguration in interface IContainerpublic IAssembler getAssemblerFacility()
IContainergetAssemblerFacility in interface IContainerpublic void sendMessage(IMessage message) throws RouteException, AvpDataException, IllegalDiameterStateException, IOException
IContainersendMessage in interface IContainermessage - session instanceRouteExceptionAvpDataExceptionIllegalDiameterStateExceptionIOExceptionpublic void addSessionListener(String sessionId, NetworkReqListener listener)
IContaineraddSessionListener in interface IContainersessionId - session idlistener - listener instancepublic void removeSessionListener(String sessionId)
IContainerremoveSessionListener in interface IContainersessionId - session identifierpublic ScheduledExecutorService getScheduledFacility()
IContainergetScheduledFacility in interface IContainerpublic IConcurrentFactory getConcurrentFactory()
IContainergetConcurrentFactory in interface IContainerpublic String configuration()
StackImplMBeanconfiguration in interface StackImplMBeanpublic String metaData()
StackImplMBeanmetaData in interface StackImplMBeanpublic String peerDescription(String name)
StackImplMBeanpeerDescription in interface StackImplMBeanname - peer host namepublic String peerList()
StackImplMBeanpeerList in interface StackImplMBeanpublic void stop(int disconnectCause)
StackImplMBeanstop in interface StackImplMBeanCopyright © 2016. All Rights Reserved.