JavaGroups.JavaStack.Protocols
Class QUEUE
java.lang.Object
|
+--JavaGroups.JavaStack.Protocol
|
+--JavaGroups.JavaStack.Protocols.QUEUE
- public class QUEUE
- extends Protocol
Queuing layer. Upon reception of event START_QUEUEING, all events traveling through
this layer upwards/downwards (depending on direction of event) will be queued. Upon
reception of a STOP_QUEUEING event, all events will be released. Finally, the
queueing flag is reset.
When queueing, only event STOP_QUEUEING (received up or downwards) will be allowed
to release queueing.
|
Constructor Summary |
QUEUE()
|
|
Method Summary |
void |
Down(Event evt)
An event is to be sent down the stack. |
java.lang.String |
GetName()
All protocol names have to be unique ! |
java.util.Vector |
ProvidedDownServices()
List of events that are provided to layers below (they will be handled when sent down from
below). |
java.util.Vector |
ProvidedUpServices()
List of events that are provided to layers above (they will be handled when sent down from
above). |
boolean |
SetProperties(java.util.Properties props)
Configures the protocol initially. |
void |
Up(Event evt)
Queues or passes up events. |
| Methods inherited from class JavaGroups.JavaStack.Protocol |
GetDownProtocol,
GetProperties,
GetUpProtocol,
PassDown,
PassUp,
RequiredDownServices,
RequiredUpServices,
Reset,
SetDownProtocol,
SetProtocolStack,
SetUpProtocol,
StartDownHandler,
StartUpHandler,
StopInternal |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
QUEUE
public QUEUE()
GetName
public java.lang.String GetName()
- All protocol names have to be unique !
- Overrides:
- GetName in class Protocol
ProvidedUpServices
public java.util.Vector ProvidedUpServices()
- Description copied from class: Protocol
- List of events that are provided to layers above (they will be handled when sent down from
above).
- Overrides:
- ProvidedUpServices in class Protocol
- Tags copied from class: Protocol
- Returns:
- Vector (of Integers)
ProvidedDownServices
public java.util.Vector ProvidedDownServices()
- Description copied from class: Protocol
- List of events that are provided to layers below (they will be handled when sent down from
below).
- Overrides:
- ProvidedDownServices in class Protocol
- Tags copied from class: Protocol
- Returns:
- Vector (of Integers)
SetProperties
public boolean SetProperties(java.util.Properties props)
- Description copied from class: Protocol
- Configures the protocol initially. A configuration string consists of name=value
items, separated by a ';' (semicolon), e.g.:
"loopback=false;unicast_inport=4444"
- Overrides:
- SetProperties in class Protocol
Up
public void Up(Event evt)
- Queues or passes up events. No queue sync. necessary, as this method is never called
concurrently.
- Overrides:
- Up in class Protocol
Down
public void Down(Event evt)
- Description copied from class: Protocol
- An event is to be sent down the stack. The layer may want to examine its type and perform
some action on it, depending on the event's type. If the event is a message MSG, then
the layer may need to add a header to it (or do nothing at all) before sending it down
the stack using
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.
- Overrides:
- Down in class Protocol