|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--JavaGroups.JavaStack.Protocol
|
+--JavaGroups.JavaStack.ProtocolStack
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 Summary | |
ProtocolStack(JChannel channel,
java.lang.String setup_string)
|
|
| Method Summary | |
void |
Destroy()
|
void |
Down(Event evt)
An event is to be sent down the stack. |
java.lang.String |
GetName()
|
java.lang.Object |
Receive(long timeout)
|
void |
Send(Message msg)
|
void |
Setup()
|
void |
Start()
Start all layers. |
void |
StartDownHandler()
Used internally. |
void |
StartUpHandler()
Used internally. |
void |
StartWork()
Override with null functionality: we don't need any threads to be started ! |
void |
Stop()
Passes a STOP event down the stack, waits for the STOP_OK event from the bottom layer. |
void |
StopInternal()
Used internally. |
void |
StopWork()
Override with null functionality: we don't need any threads to be started ! |
void |
Up(Event evt)
An event was received from the layer below. |
| Methods inherited from class JavaGroups.JavaStack.Protocol |
GetDownProtocol,
GetProperties,
GetUpProtocol,
PassDown,
PassUp,
ProvidedDownServices,
ProvidedUpServices,
RequiredDownServices,
RequiredUpServices,
Reset,
SetDownProtocol,
SetProperties,
SetProtocolStack,
SetUpProtocol |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ProtocolStack(JChannel channel,
java.lang.String setup_string)
| Method Detail |
public void Setup()
throws java.lang.Exception
public void Destroy()
throws java.lang.Exception
public void Start()
throws java.lang.Exception
public void StartUpHandler()
public void StartDownHandler()
public void Stop()
public void StopInternal()
public void Send(Message msg)
throws java.lang.Exception
public java.lang.Object Receive(long timeout)
throws java.lang.Exception
public java.lang.String GetName()
public void Up(Event evt)
PassDown or c) the event (or another event) is sent up
the stack using PassUp.public void Down(Event evt)
PassDown. In case of a GET_ADDRESS event (which tries to
retrieve the stack's address from one of the bottom layers), the layer may need to send
a new response event back up the stack using PassUp.public void StartWork()
public void StopWork()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||