All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.JChannel

java.lang.Object
   |
   +----JavaGroups.Channel
           |
           +----JavaGroups.JChannel

public class JChannel
extends Channel
JChannel is a pure Java implementation of Channel.


Constructor Index

 o JChannel()
 o JChannel(Object)

Method Index

 o BlockOk()
Called to acknowledge a Block (callback in MembershipListener or BlockEvent received from call to Receive).
 o Close()
Destroys the channel.
 o Connect(Object)
Connects the channel to a group.
 o Disconnect()
Disconnects the channel from the current group (if connected), leaving the group.
 o Down(Event)
 o finalize()
 o GetAllStates(long)
Retrieves the current group state.
 o GetGroupAddress()
Returns the group address of the group of which the channel is a member.
 o GetLocalAddress()
Returns the channel's own address.
 o GetOpt(int)
Gets an option.
 o GetState(long)
Retrieves the current group state.
 o GetView()
Gets the current view.
 o Peek(long)
Just peeks at the next message, view or block.
 o Receive(long)
Receives a message, a view change or a block event.
 o ReturnState(Serializable)
Called by the application is response to receiving a GetState object when calling Receive.
 o Send(Message)
Sends a message to a destination.
 o SetOpt(int, Object)
Sets an option.
 o Up(Event)
Called by the ProtocolStack when a message is received.

Constructors

 o JChannel
 public JChannel() throws ChannelException
 o JChannel
 public JChannel(Object properties) throws ChannelException

Methods

 o Connect
 public synchronized void Connect(Object group_address) throws ChannelClosed
Connects the channel to a group.

Parameters:
group_address - A String denoting the group name.
Overrides:
Connect in class Channel
 o Disconnect
 public synchronized void Disconnect()
Disconnects the channel from the current group (if connected), leaving the group.

Overrides:
Disconnect in class Channel
 o Close
 public synchronized void Close()
Destroys the channel. After this method has been called, the channel us unusable.

Overrides:
Close in class Channel
 o finalize
 public synchronized void finalize()
Overrides:
finalize in class Object
 o Send
 public void Send(Message msg) throws ChannelNotConnected, ChannelClosed
Sends a message to a destination.

Overrides:
Send in class Channel
 o Receive
 public Object Receive(long timeout) throws ChannelNotConnected, ChannelClosed, Timeout
Receives a message, a view change or a block event.

Overrides:
Receive in class Channel
 o Peek
 public Object Peek(long timeout) throws ChannelNotConnected, ChannelClosed, Timeout
Just peeks at the next message, view or block. Does not install new view if view is received

Overrides:
Peek in class Channel
 o GetView
 public View GetView()
Gets the current view.

Overrides:
GetView in class Channel
 o GetLocalAddress
 public Object GetLocalAddress()
Returns the channel's own address.

Overrides:
GetLocalAddress in class Channel
 o GetGroupAddress
 public Object GetGroupAddress()
Returns the group address of the group of which the channel is a member.

Overrides:
GetGroupAddress in class Channel
 o SetOpt
 public void SetOpt(int option,
                    Object value)
Sets an option.

Overrides:
SetOpt in class Channel
 o GetOpt
 public Object GetOpt(int option)
Gets an option.

Overrides:
GetOpt in class Channel
 o BlockOk
 public void BlockOk()
Called to acknowledge a Block (callback in MembershipListener or BlockEvent received from call to Receive).

Overrides:
BlockOk in class Channel
 o GetState
 public boolean GetState(long timeout)
Retrieves the current group state. Sends GET_STATE event down to STATE_TRANSFER layer. Blocks until STATE_TRANSFER sends up a GET_STATE_OK event or until timeout milliseconds have elapsed. The argument of GET_STATE_OK should be a single object.

Overrides:
GetState in class Channel
 o GetAllStates
 public boolean GetAllStates(long timeout)
Retrieves the current group state. Sends GET_STATE event down to STATE_TRANSFER layer. Blocks until STATE_TRANSFER sends up a GET_STATE_OK event or until timeout milliseconds have elapsed. The argument of GET_STATE_OK should be a vector of objects.

Overrides:
GetAllStates in class Channel
 o ReturnState
 public void ReturnState(Serializable state)
Called by the application is response to receiving a GetState object when calling Receive.

Overrides:
ReturnState in class Channel
 o Up
 public void Up(Event evt)
Called by the ProtocolStack when a message is received. It will be added to the message queue from which subsequent Receives will dequeue it.

 o Down
 public void Down(Event evt)

All Packages  Class Hierarchy  This Package  Previous  Next  Index