All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.EnsChannel

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

public class EnsChannel
extends Channel
implements Hot_Callbacks
EnsChannel is an implementation of Channel based on Ensemble. It maps a process group to a channel. Requirements are the presence of an executable called outboard (which is Ensemble) and gossip running.


Constructor Index

 o EnsChannel()
 o EnsChannel(Object)
Creates a new EnsChannel, which spawns an outboard process and connects to it.
 o EnsChannel(Object, String, int)
Creates a new EnsChannel.

Method Index

 o AcceptedView(Hot_GroupContext, Object, Hot_ViewState)
 o Block(Hot_GroupContext, Object)
 o BlockOk()
Called to acknowledge a Block (callback in MembershipListener or BlockEvent received from call to Receive).
 o Close()
Destroys the channel and its associated resources (e.g.
 o Connect(Object)
Connects the channel to a group.
 o Disconnect()
Disconnects the channel from the current group (if connected), leaving the group.
 o Exit(Hot_GroupContext, Object)
 o finalize()
 o GetAllStates(Vector, long)
Retrieve all states of the group members.
 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(Object, long)
Retrieve the state of the group.
 o GetView()
Gets the current view.
 o Heartbeat(Hot_GroupContext, Object, int)
 o Peek(long)
Returns the next message, view, block, suspect or other event without removing it from the queue.
 o Receive(long)
Receives a message, a view change or a block event.
 o ReceiveCast(Hot_GroupContext, Object, Hot_Endpoint, Hot_Message)
 o ReceiveSend(Hot_GroupContext, Object, Hot_Endpoint, Hot_Message)
 o ReturnState(Object)
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.

Constructors

 o EnsChannel
 public EnsChannel() throws ChannelException
 o EnsChannel
 public EnsChannel(Object props) throws ChannelException
Creates a new EnsChannel, which spawns an outboard process and connects to it.

Parameters:
name - Channel name. All channels with the same name form a group.
properties - Ensemble properties (cf. Ensemble reference manual). A value of null uses the default properties.
 o EnsChannel
 public EnsChannel(Object props,
                   String transport_props,
                   int outboard_port) throws ChannelException
Creates a new EnsChannel. Instead of spawning a new outboard process, it connects to an already running outboard process (on the same machine) using outboard_port. This allows multiple EnsChannels to share a copy of outboard. If the port is 0, outboard will be spawned. Parameter transport_props defines the type of transport to be used (UDP, ATM, IP MCAST etc).

Parameters:
properties - Ensemble properties (cf. Ensemble reference manual). A value of null uses the default properties.
transport_props - Transport parameters. Null means use default (UDP). Example: "UDP:DEERING" uses IP multicast (gossip is not needed in this case).
outboard_port - Port on which the local outboard process is listening. The outboard process has to be started before. Value of 0 means spawn outboard nevertheless.

Methods

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

Overrides:
Connect in class Channel
 o Disconnect
 public void Disconnect()
Disconnects the channel from the current group (if connected), leaving the group.

Overrides:
Disconnect in class Channel
 o Close
 public void Close()
Destroys the channel and its associated resources (e.g.

Overrides:
Close in class Channel
 o finalize
 public 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
Returns the next message, view, block, suspect or other event without removing it from the queue.

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(Object target,
                         long timeout)
Retrieve the state of the group.

Overrides:
GetState in class Channel
 o GetAllStates
 public boolean GetAllStates(Vector targets,
                             long timeout)
Retrieve all states of the group members.

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

Overrides:
ReturnState in class Channel
 o ReceiveCast
 public void ReceiveCast(Hot_GroupContext gctx,
                         Object env,
                         Hot_Endpoint origin,
                         Hot_Message msg)
 o ReceiveSend
 public void ReceiveSend(Hot_GroupContext gctx,
                         Object env,
                         Hot_Endpoint origin,
                         Hot_Message msg)
 o AcceptedView
 public void AcceptedView(Hot_GroupContext gctx,
                          Object env,
                          Hot_ViewState viewState)
 o Heartbeat
 public void Heartbeat(Hot_GroupContext gctx,
                       Object env,
                       int rate)
 o Block
 public void Block(Hot_GroupContext gctx,
                   Object env)
 o Exit
 public void Exit(Hot_GroupContext gctx,
                  Object env)

All Packages  Class Hierarchy  This Package  Previous  Next  Index