org.jgroups.stack
public class ProtocolStack extends Protocol implements Transport
The ProtocolStack makes use of the Configurator to setup and initialize stacks, and to destroy them again when not needed anymore
Field Summary | |
---|---|
static int | ABOVE |
static int | BELOW |
TimeScheduler | timer |
Constructor Summary | |
---|---|
ProtocolStack(JChannel channel, String setup_string) | |
ProtocolStack() Only used by Simulator; don't use |
Method Summary | |
---|---|
Protocol | createProtocol(String prot_spec)
Creates a new protocol given the protocol specification. |
void | destroy() |
void | down(Event evt) |
Map | dumpStats() |
String | dumpTimerQueue() |
Protocol | findProtocol(String name) Returns a given protocol or null if not found |
void | flushEvents()
Not needed anymore, just left in here for backwards compatibility with JBoss AS |
Channel | getChannel() |
String | getName() |
Vector | getProtocols() Returns all protocols in a list, from top to bottom. |
void | insertProtocol(Protocol prot, int position, String neighbor_prot)
Inserts an already created (and initialized) protocol into the protocol list. |
String | printProtocolSpec(boolean include_properties)
Prints the names of the protocols, from the bottom to top. |
String | printProtocolSpecAsXML() |
Object | receive(long timeout) |
protected void | receiveUpEvent(Event evt) |
void | removeProtocol(String prot_name)
Removes a protocol from the stack. |
void | send(Message msg) |
void | setup() |
void | startDownHandler() |
void | startStack()
Start all layers. |
void | startUpHandler() |
void | startWork() Override with null functionality: we don't need any threads to be started ! |
void | stopInternal() |
void | stopStack()
Iterates through all the protocols from top to bottom and does the following:
|
void | stopWork() Override with null functionality: we don't need any threads to be started ! |
void | up(Event evt) |
Parameters: prot_spec The specification of the protocol. Same convention as for specifying a protocol stack.
An exception will be thrown if the class cannot be created. Example:
"VERIFY_SUSPECT(timeout=1500)"
Note that no colons (:) have to be
specified
Returns: Protocol The newly created protocol
Throws: Exception Will be thrown when the new protocol cannot be created
Returns: Map
Deprecated:
Not needed anymore, just left in here for backwards compatibility with JBoss ASParameters: prot The protocol to be inserted. Before insertion, a sanity check will ensure that none of the existing protocols have the same name as the new protocol. position Where to place the protocol with respect to the neighbor_prot (ABOVE, BELOW) neighbor_prot The name of the neighbor protocol. An exception will be thrown if this name is not found
Throws: Exception Will be thrown when the new protocol cannot be created, or inserted.
Parameters: prot_name The name of the protocol. Since all protocol names in a stack have to be unique (otherwise the stack won't be created), the name refers to just 1 protocol.
Throws: Exception Thrown if the protocol cannot be stopped correctly.