|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Stack
The interface that every stack class must implement. The Java Diameter framework allows for multiple database stacks.
Each stack should supply a class that implements the Stack interface.
The StackManager will try to load as many stacks.
It is strongly recommended that each Stack class should be small and standalone.
When a Stack class is loaded, it should create an instance of itself and register it with the StackManager.
This means that a user can load and register a stack by calling
Class.forName("org.jdiameter.impl.Stack")
Wrapper interface allows adapt message to any driver vendor specific interface
Life cycle state machine for stack
Stack must supported following wrapper classes: - Client API : PeerManager - Server API : PeerManager, OverloadManager (Network, PeerManagerWrapper is optional)
| Method Summary | ||
|---|---|---|
void |
destroy()
Destroy any resource append to this instance of stack |
|
Dictionary |
getDictionary()
Return Dictionary instance |
|
java.util.logging.Logger |
getLogger()
Return logger instance. |
|
MetaData |
getMetaData()
|
|
|
getSession(java.lang.String sessionId,
java.lang.Class<T> clazz)
Return an existing session, if present |
|
SessionFactory |
getSessionFactory()
Return SessionFactory instance |
|
SessionFactory |
init(Configuration config)
Configuration stack and allocation system resources. |
|
boolean |
isActive()
|
|
void |
start()
Start activity of stack (Thread and Network connections), not waiting switch ANY peer to OKEY state |
|
void |
start(Mode mode,
long timeout,
java.util.concurrent.TimeUnit unit)
Start activity of stack (Thread and Network connections), waiting specified wait time switch peers to OKEY state. |
|
void |
stop(long timeout,
java.util.concurrent.TimeUnit unit,
int disconnectCause)
Stop any activity of stack (Thread and Network connections), waiting if necessary up to the specified wait time switch peers to DOWN state. |
|
| Methods inherited from interface org.jdiameter.api.Wrapper |
|---|
isWrapperFor, unwrap |
| Method Detail |
|---|
SessionFactory init(Configuration config)
throws IllegalDiameterStateException,
InternalException
config - Object with configuration parameters
IllegalDiameterStateException - if a stack already configured or destroyed
InternalException - if a stack can not processing initial procedure
void start()
throws IllegalDiameterStateException,
InternalException
IllegalDiameterStateException - if a stack is not configured or stopped
InternalException - if a stack can not processing start procedure
void start(Mode mode,
long timeout,
java.util.concurrent.TimeUnit unit)
throws IllegalDiameterStateException,
InternalException
mode - specified type of wait proceduretimeout - how long to wait before giving up, in units of unitunit - a TimeUnit determining how to interpret the timeout parameter
IllegalDiameterStateException - if a stack is not configured or stopped
InternalException - if a stack can not processing start procedure
void stop(long timeout,
java.util.concurrent.TimeUnit unit,
int disconnectCause)
throws IllegalDiameterStateException,
InternalException
timeout - how long to wait before giving up, in units of unitunit - a TimeUnit determining how to interpret the timeout parameterdisconnectCause - the disconnect-cause to be used in the DPR message(s)
IllegalDiameterStateException - if a stack is not started
InternalException - if a stack can not processing start procedurevoid destroy()
boolean isActive()
java.util.logging.Logger getLogger()
SessionFactory getSessionFactory()
throws IllegalDiameterStateException
IllegalDiameterStateException - if stack is not configured
Dictionary getDictionary()
throws IllegalDiameterStateException
IllegalDiameterStateException - if stack is not configuredMetaData getMetaData()
<T extends BaseSession> T getSession(java.lang.String sessionId,
java.lang.Class<T> clazz)
throws InternalException
sessionId - the session identifierclazz - the class of the session object
InternalException - if stack is not configured
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||