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.
-
ProtocolStack(JChannel, String)
-
-
Down(Event)
- An event is to be sent down the stack.
-
GetChannelName()
- Since a protocol stack is always associated with only 1 channel, it always know the
channel name.
-
GetLocalAddress()
-
-
GetName()
-
-
GetNewMulticastAddress()
-
-
JoinMulticastAddress(Address)
-
-
LeaveMulticastAddress(Address)
-
-
Lookup(String)
-
-
Register(String, Object)
-
-
Start()
- Create protocol stack (using Configurator).
-
StartWork()
- Just override with null functionality: we don't need any threads to be started !
-
Stop()
-
-
StopWork()
- Just override with null functionality: we don't need any threads to be started !
-
UnRegister(String)
-
-
Up(Event)
- An event was received from the layer below.
ProtocolStack
public ProtocolStack(JChannel channel,
String setup_string)
Start
public void Start() throws Exception
- Create protocol stack (using Configurator). Put MessageDispatcher on top of stack and
redirect all messages to it.
Stop
public void Stop()
GetChannelName
public String GetChannelName()
- Since a protocol stack is always associated with only 1 channel, it always know the
channel name.
Register
public void Register(String name,
Object obj)
UnRegister
public void UnRegister(String name)
Lookup
public Object Lookup(String name)
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()
- Just override with null functionality: we don't need any threads to be started !
- Overrides:
- StartWork in class Protocol
StopWork
public void StopWork()
- Just override with null functionality: we don't need any threads to be started !
- Overrides:
- StopWork in class Protocol
GetLocalAddress
public Address GetLocalAddress()
GetNewMulticastAddress
public Address GetNewMulticastAddress()
JoinMulticastAddress
public void JoinMulticastAddress(Address mcast_address)
LeaveMulticastAddress
public void LeaveMulticastAddress(Address mcast_address)
All Packages Class Hierarchy This Package Previous Next Index