Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net
Class MemberEvent

`java.lang.Object
java.util.EventObject
com.tangosol.net.MemberEvent`

All Implemented Interfaces:
  Serializable

      public class MemberEvent

extends EventObject

An event which indicates that membership has changed:

- a Member has joined
- a Member is leaving
- a Member has left

A MemberEvent object is sent as an argument to the MemberListener interface methods.

Author:
  cp 2002.12.12
See Also:
  `MemberListener`

Field Summary
`static int` | `MEMBER_JOINED` This event indicates that a Member has joined.
`static int` | `MEMBER_LEAVING` This event indicates that a Member is leaving.
`static int` | `MEMBER_LEFT` This event indicates that a Member has left.

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`MemberEvent(Object oSource, int nId, Member member)` Constructs a new MemberEvent.

Method Summary
`void` | `dispatch(EventListener[] aListeners)` Dispatch this event to the specified array of listeners.
`void` | `dispatch(Listeners listeners)` Dispatch this event to the specified listeners collection.
`int` | `getId()` Return this event's id.
`Member` | `getMember()` Return the Member associated with this event.
`Service` | `getService()` Return the Service that fired the event
`boolean` | `isLocal()` Check whether a Member object for this event represents the local member of the cluster.
`String` | `toString()` Returns a String representation of this MemberEvent object.

Methods inherited from class java.util.EventObject
`getSource`

Field Detail

### MEMBER_JOINED

    public static final int MEMBER_JOINED

  This event indicates that a Member has joined.
  See Also:
    Constant Field Values

### MEMBER_LEAVING

    public static final int MEMBER_LEAVING

  This event indicates that a Member is leaving.
  See Also:
    Constant Field Values

### MEMBER_LEFT

    public static final int MEMBER_LEFT

  This event indicates that a Member has left.
  See Also:
    Constant Field Values

Constructor Detail

### MemberEvent

    public MemberEvent(Object oSource,
                       int nId,
                       Member member)

  Constructs a new MemberEvent.
  Parameters:
    `oSource` - the source object that fired the event (a Service)
    `nId` - this event's id
    `member` - the Member for which the event applies

Method Detail

### getId

    public int getId()

  Return this event's id.
  Returns:
    the event ID, one of

### getMember

    public Member getMember()

  Return the Member associated with this event.
  Returns:
    the Member

### getService

    public Service getService()

  Return the Service that fired the event
  Returns:
    the Service

### dispatch

    public void dispatch(Listeners listeners)

  Dispatch this event to the specified listeners collection.
  Parameters:
    `listeners` - the listeners collection
  Throws:
    `ClassCastException` - if any of the targets is not an instance of MemberListener interface

### dispatch

    public void dispatch(EventListener[] aListeners)

  Dispatch this event to the specified array of listeners.
  Parameters:
    `aListeners` - the array of listeners
  Throws:
    `ClassCastException` - if any of the targets is not an instance of MemberListener interface

### isLocal

    public boolean isLocal()

  Check whether a Member object for this event represents the local member of the cluster.
  Returns:
    true iff the event's Member object represents the local cluster member

### toString

    public String toString()

  Returns a String representation of this MemberEvent object.
  Overrides:
    `toString` in class `EventObject`
  Returns:
    a String representation of this MemberEvent object.

Skip navigation links

Overview | Package | Class | Tree | Index | Help
| Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.