next up previous contents
Next: Sending a message Up: Channel Previous: Getting the local address   Contents

Getting the current view

The following method can be used to get the current view of a channel:

    public View getView();

This method does not retrieve a new view (message) from the channel, but only returns the current view of the channel. The current view is updated every time a view message is received: when method receive() is called, and the return value is a view, before the view is returned, it will be installed in the channel, i.e. it will become the current view.

Calling this method on an unconnected or closed channel is implementation defined. A channel may return null, or it may return the last view it knew of.



Bela Ban 2002-11-16