All Packages Class Hierarchy This Package Previous Next Index
Class JavaGroups.JavaStack.ProtocolStack
java.lang.Object
|
+----JavaGroups.JavaStack.Protocol
|
+----JavaGroups.JavaStack.ProtocolStack
- public class ProtocolStack
- extends Protocol
- implements Transport
A ProtocolStack manages a number of protocols layered above each other. It creates all
protocol classes, initializes them and, when ready, starts all of them, beginning with the
bottom most protocol. It also dispatches messages received from the stack to registered
objects (e.g. channel, GMP) and sends messages sent by those objects down the stack.
The ProtocolStack makes use of the Configurator to setup and initialize stacks, and to
detroy them again when not needed anymore.
The bottommost instance has to implement interface LowLevelCommunication
.
This is necessary to be able to retrieve one's own (transport specific) address, join multicast
addresses etc.
-
ProtocolStack(JChannel, String)
-
-
Destroy()
-
-
Down(Event)
- An event is to be sent down the stack.
-
GetName()
-
-
Receive(long)
-
-
Send(Message)
-
-
Setup()
-
-
Start()
- Start all layers.
-
StartInternal()
- Used internally.
-
StartWork()
- Override with null functionality: we don't need any threads to be started !
-
Stop()
- Passes a STOP event down the stack, waits for the STOP_OK event from the bottom layer.
-
StopInternal()
- Used internally.
-
StopWork()
- Override with null functionality: we don't need any threads to be started !
-
Up(Event)
- An event was received from the layer below.
ProtocolStack
public ProtocolStack(JChannel channel,
String setup_string)
Setup
public void Setup() throws Exception
Destroy
public void Destroy() throws Exception
Start
public void Start() throws Exception
- Start all layers. A START event is sent from the bottom layer up the stack. Each layer
can perform some initialization.
StartInternal
public void StartInternal()
- Used internally.
- Overrides:
- StartInternal in class Protocol
Stop
public void Stop()
- Passes a STOP event down the stack, waits for the STOP_OK event from the bottom layer.
Clears all message queues
StopInternal
public void StopInternal()
- Used internally.
- Overrides:
- StopInternal in class Protocol
Send
public void Send(Message msg) throws Exception
Receive
public Object Receive(long timeout) throws Exception
GetName
public String GetName()
- Overrides:
- GetName in class Protocol
Up
public void Up(Event evt)
- An event was received from the layer below.
- Overrides:
- Up in class Protocol
Down
public void Down(Event evt)
- An event is to be sent down the stack.
- Overrides:
- Down in class Protocol
StartWork
public void StartWork()
- Override with null functionality: we don't need any threads to be started !
StopWork
public void StopWork()
- Override with null functionality: we don't need any threads to be started !
All Packages Class Hierarchy This Package Previous Next Index