All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iBus.View

java.lang.Object
   |
   +----iBus.Event
           |
           +----iBus.View

public class View
extends Event
Objects of type View encapsulate information on the members subscribed to a channel. A ``member'' is a Java object that implements interface iBus.Membership. Membership layers such as REACH create View objects and deliver them to the local members that implement interface iBus.Membership.

See Also:
ChannelMember

Constructor Index

 o View()
Create a void View object to be deserialized.
 o View(Stack, int, ChannelMember[], int, iBusURL)
Create a View object to be delivered to iBus layers.

Method Index

 o containsListener(iBusURL)
Checks for the existence of a certain listener in the view.
 o containsMember(iBusURL)
Checks for the existence of a certain member in the view.
 o containsTalker(iBusURL)
Checks for the existence of a certain talker in the view.
 o getChannel()
Return the URL of the channel associated with the view.
 o getMember(iBusURL)
Get the member that matches a given URL.
 o getMember(int)
Get the member for a given index.
 o getMembers()
Returns membership information for all members that are subscribed to the channel.
 o getMyRank()
Returns the rank number of the member the View is delivered to.
 o getNumMembers()
Returns the number of members in the view.
 o getViewID()
Returns the view ID used for ranking views in the order they occurred in the history.
 o id()
Returns the identifier of this type of event.
 o numListeners()
Returns the number of listeners thar are in the view.
 o numTalkers()
Returns the number of talkers thar are in the view.

Constructors

 o View
 public View(Stack stack,
             int myRank,
             ChannelMember members[],
             int vid,
             iBusURL channel)
Create a View object to be delivered to iBus layers.

Parameters:
stack - the creator stack
myRank - the rank of the local stack
members - the new membership view
vid - the ID of this view
channel - the URL of the channel associated with the view
 o View
 public View()
Create a void View object to be deserialized.

Methods

 o getMyRank
 public int getMyRank()
Returns the rank number of the member the View is delivered to.

Returns:
the rank number of the member the View is delivered to
 o getNumMembers
 public int getNumMembers()
Returns the number of members in the view.

Returns:
the number of members in the view
 o getMember
 public synchronized ChannelMember getMember(iBusURL member)
Get the member that matches a given URL. Returns null if no such member exists in the view.

Parameters:
member - the URL of the member to return
Returns:
the ChannelMember object that matches the member URL. null if no such member exists in the view
 o getMember
 public synchronized ChannelMember getMember(int index)
Get the member for a given index.

Parameters:
index - the position of the member to return
Returns:
the member for a given index
 o getMembers
 public ChannelMember[] getMembers()
Returns membership information for all members that are subscribed to the channel.

Returns:
membership information for all members that are subscribed to the channel
 o containsMember
 public synchronized boolean containsMember(iBusURL member)
Checks for the existence of a certain member in the view.

Parameters:
member - the member to look for in the view
Returns:
true if the member exists, false otherwise
 o containsListener
 public synchronized boolean containsListener(iBusURL listener)
Checks for the existence of a certain listener in the view.

Parameters:
listener - the listener to look for in the view
Returns:
true if the listener exists, false otherwise
 o numListeners
 public synchronized int numListeners()
Returns the number of listeners thar are in the view.

Returns:
the number of listeners thar are in the view
 o containsTalker
 public synchronized boolean containsTalker(iBusURL talker)
Checks for the existence of a certain talker in the view.

Parameters:
talker - the talker to look for in the view
Returns:
true if the talker exists, false otherwise
 o numTalkers
 public synchronized int numTalkers()
Returns the number of talkers thar are in the view.

Returns:
the number of talkers thar are in the view
 o getViewID
 public synchronized int getViewID()
Returns the view ID used for ranking views in the order they occurred in the history.

Returns:
the view ID
 o getChannel
 public iBusURL getChannel()
Return the URL of the channel associated with the view.

Returns:
the URL of the channel associated with the view
 o id
 public int id()
Returns the identifier of this type of event.

Returns:
the identifier of this type of event
Overrides:
id in class Event

All Packages  Class Hierarchy  This Package  Previous  Next  Index