urv.machannel
Interface MChannel

All Known Implementing Classes:
MChannelImpl

public interface MChannel

This interface defines the methods that provides our Topology Aware Multicast Channel

Author:
Marcel Arrufat Arias, Raśl Gracia Tinedo

Method Summary
 void close()
          Stops the channel
 java.lang.String getChannelName()
          This method retrieves the name of the channel
 java.util.List<java.net.InetAddress> getInetAddressesOfGroupMebers()
          Return the InetAddresses of the group members
 org.jgroups.Address getLocalAddress()
          Returns the Address of the Local Node
 NetworkGraph<OLSRNode,Weight> getNetworkGraph()
          Retrieves the NetworkGraph with the topology below us
 org.jgroups.View getView()
          Returns a view with the members of the current group
 void registerListener(java.io.Serializable identifier, org.jgroups.MessageListener messageListener)
          Removes a Message listener from the transport layer
 void send(org.jgroups.Address dst, org.jgroups.Address src, java.io.Serializable content)
          Sends an unicast message to the selected member.
 void send(org.jgroups.Message msg)
          Sends the message to the destination of the messages.
 void sendToNeighbors(java.io.Serializable content)
          Send a message to all neighbours (1 hop) of the current group
 void unregisterListener(java.io.Serializable identifier)
          Add a Message listener in the transport layer
 

Method Detail

getLocalAddress

org.jgroups.Address getLocalAddress()
Returns the Address of the Local Node

Returns:
local Address

getChannelName

java.lang.String getChannelName()
This method retrieves the name of the channel

Returns:
MChannelName

getInetAddressesOfGroupMebers

java.util.List<java.net.InetAddress> getInetAddressesOfGroupMebers()
Return the InetAddresses of the group members

Returns:
addressesOfGroupMembers

getNetworkGraph

NetworkGraph<OLSRNode,Weight> getNetworkGraph()
Retrieves the NetworkGraph with the topology below us

Returns:
Topology Graph

getView

org.jgroups.View getView()
Returns a view with the members of the current group

Returns:
Members
See Also:
View

close

void close()
Stops the channel


send

void send(org.jgroups.Message msg)
Sends the message to the destination of the messages. As the normal Channel, if the destination is a multicast address, the message is sent to all members of this group.


send

void send(org.jgroups.Address dst,
          org.jgroups.Address src,
          java.io.Serializable content)
Sends an unicast message to the selected member.


sendToNeighbors

void sendToNeighbors(java.io.Serializable content)
Send a message to all neighbours (1 hop) of the current group


unregisterListener

void unregisterListener(java.io.Serializable identifier)
Add a Message listener in the transport layer

Parameters:
listener -
See Also:
PullPushAdapter

registerListener

void registerListener(java.io.Serializable identifier,
                      org.jgroups.MessageListener messageListener)
Removes a Message listener from the transport layer

Parameters:
listener -
See Also:
PullPushAdapter