All Packages Class Hierarchy This Package Previous Next Index
Class JavaGroups.JavaStack.Protocols.GMS
java.lang.Object
|
+----JavaGroups.JavaStack.Protocol
|
+----JavaGroups.JavaStack.Protocols.GMS
- public class GMS
- extends Protocol
- implements Transportable
-
type
-
-
GMS()
-
-
Down(Event)
- An event is to be sent down the stack.
-
FindInitialMembers(String)
-
-
GetName()
-
-
GetPingNum()
-
-
GetPingTime()
-
-
GetProtocolStack()
-
-
Join(Address)
-
-
Leave(Address)
-
-
Receive(long)
- Remove a message from the rsp_queue
-
Send(Message)
-
Used e.g.
-
SetProperties(Properties)
- Setup the Protocol instance acording to the configuration string
-
StartWork()
- Initialize data structures, start own threads etc.
-
StopWork()
- Delete data structures, stop own threads etc.
-
toString()
-
-
Up(Event)
- In case of a request, forward the message to the method invoker.
-
UseGossip()
-
type
public final int type
GMS
public GMS()
GetProtocolStack
public ProtocolStack GetProtocolStack()
GetName
public String GetName()
- Overrides:
- GetName in class Protocol
UseGossip
public boolean UseGossip()
GetPingTime
public long GetPingTime()
GetPingNum
public int GetPingNum()
FindInitialMembers
public Vector FindInitialMembers(String channel_name)
Join
public void Join(Address new_member)
Leave
public void Leave(Address member)
Send
public void Send(Message msg) throws Exception
- Used e.g. by MethodInvoker to return a response. Tag the message with our type,
this result in our the message being caught by the corresponding GMS layer in
the other protocol stack(s).
The assumption here is that all messages sent using the
Send
method
will always only be sent to other GMSs ! If this is not the case, then the
Down
method should be used, with the
type
field set accordingly
Receive
public Message Receive(long timeout) throws Exception
- Remove a message from the rsp_queue
Up
public void Up(Event evt)
- In case of a request, forward the message to the method invoker. In case of a response,
put it on the response queue, to be retrieved by later Receive() calls.
- 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()
- Initialize data structures, start own threads etc.
- Overrides:
- StartWork in class Protocol
StopWork
public void StopWork()
- Delete data structures, stop own threads etc.
- Overrides:
- StopWork in class Protocol
SetProperties
public void SetProperties(Properties props)
- Setup the Protocol instance acording to the configuration string
- Overrides:
- SetProperties in class Protocol
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index