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 LowLevelCommunication
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 Down(Event)
An event is to be sent down the stack.
 o GetChannelName()
Since a protocol stack is always associated with only 1 channel, it always know the channel name.
 o GetLocalAddress()
 o GetName()
 o GetNewMulticastAddress()
 o JoinMulticastAddress(Address)
 o LeaveMulticastAddress(Address)
 o Lookup(String)
 o Register(String, Object)
 o Start()
Create protocol stack (using Configurator).
 o StartWork()
Just override with null functionality: we don't need any threads to be started !
 o Stop()
 o StopWork()
Just override with null functionality: we don't need any threads to be started !
 o UnRegister(String)
 o Up(Event)
An event was received from the layer below.

Constructors

 o ProtocolStack
 public ProtocolStack(JChannel channel,
                      String setup_string)

Methods

 o Start
 public void Start() throws Exception
Create protocol stack (using Configurator). Put MessageDispatcher on top of stack and redirect all messages to it.

 o Stop
 public void Stop()
 o GetChannelName
 public String GetChannelName()
Since a protocol stack is always associated with only 1 channel, it always know the channel name.

 o Register
 public void Register(String name,
                      Object obj)
 o UnRegister
 public void UnRegister(String name)
 o Lookup
 public Object Lookup(String name)
 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()
Just override with null functionality: we don't need any threads to be started !

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

Overrides:
StopWork in class Protocol
 o GetLocalAddress
 public Address GetLocalAddress()
 o GetNewMulticastAddress
 public Address GetNewMulticastAddress()
 o JoinMulticastAddress
 public void JoinMulticastAddress(Address mcast_address)
 o LeaveMulticastAddress
 public void LeaveMulticastAddress(Address mcast_address)

All Packages  Class Hierarchy  This Package  Previous  Next  Index