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
-
View()
- Create a void View object to be deserialized.
-
View(Stack, int, ChannelMember[], int, iBusURL)
- Create a View object to be delivered to iBus layers.
-
containsListener(iBusURL)
- Checks for the existence of a certain listener in the view.
-
containsMember(iBusURL)
- Checks for the existence of a certain member in the view.
-
containsTalker(iBusURL)
- Checks for the existence of a certain talker in the view.
-
getChannel()
- Return the URL of the channel associated with the view.
-
getMember(iBusURL)
- Get the member that matches a given URL.
-
getMember(int)
- Get the member for a given index.
-
getMembers()
- Returns membership information for all members that are subscribed to the
channel.
-
getMyRank()
- Returns the rank number of the member the View is delivered to.
-
getNumMembers()
- Returns the number of members in the view.
-
getViewID()
- Returns the view ID used for ranking views in the order they
occurred in the history.
-
id()
- Returns the identifier of this type of event.
-
numListeners()
- Returns the number of listeners thar are in the view.
-
numTalkers()
- Returns the number of talkers thar are in the view.
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
View
public View()
- Create a void View object to be deserialized.
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
getNumMembers
public int getNumMembers()
- Returns the number of members in the view.
- Returns:
- the number of members in the view
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
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
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
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
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
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
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
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
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
getChannel
public iBusURL getChannel()
- Return the URL of the channel associated with the view.
- Returns:
- the URL of the channel associated with the view
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