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.


Constructor Index

 o ProtocolStack(JChannel, String)

Method Index

 o Destroy()
 o Down(Event)
An event is to be sent down the stack.
 o GetName()
 o Receive(long)
 o Send(Message)
 o Setup()
 o Start()
Start all layers.
 o StartInternal()
Used internally.
 o StartWork()
Override with null functionality: we don't need any threads to be started !
 o Stop()
Passes a STOP event down the stack, waits for the STOP_OK event from the bottom layer.
 o StopInternal()
Used internally.
 o StopWork()
Override with null functionality: we don't need any threads to be started !
 o Up(Event)
An event was received from the layer below.

Constructors

 o ProtocolStack
 public ProtocolStack(JChannel channel,
                      String setup_string)

Methods

 o Setup
 public void Setup() throws Exception
 o Destroy
 public void Destroy() throws Exception
 o 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.

 o StartInternal
 public void StartInternal()
Used internally.

Overrides:
StartInternal in class Protocol
 o 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

 o StopInternal
 public void StopInternal()
Used internally.

Overrides:
StopInternal in class Protocol
 o Send
 public void Send(Message msg) throws Exception
 o Receive
 public Object Receive(long timeout) throws Exception
 o GetName
 public String GetName()
Overrides:
GetName in class Protocol
 o Up
 public void Up(Event evt)
An event was received from the layer below.

Overrides:
Up in class Protocol
 o Down
 public void Down(Event evt)
An event is to be sent down the stack.

Overrides:
Down in class Protocol
 o StartWork
 public void StartWork()
Override with null functionality: we don't need any threads to be started !

 o 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