|
||||||||||
| 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 instacne of stack |
java.util.logging.Logger |
getLogger()
Return logger instance. |
MetaData |
getMetaData()
|
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 swith 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 swith peers to OKEY state. |
void |
stop(long timeout,
java.util.concurrent.TimeUnit unit)
Stop any activity of stack (Thread and Network connections), waiting if necessary up to the specified wait time swith 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 destroed
InternalException - if a stack can not processing initial procedure
void start()
throws IllegalDiameterStateException,
InternalException
IllegalDiameterStateException - if a stack is not confgured 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 confgured or stopped
InternalException - if a stack can not processing start procedure
void stop(long timeout,
java.util.concurrent.TimeUnit unit)
throws IllegalDiameterStateException,
InternalException
timeout - 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 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 configureMetaData getMetaData()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||