NetModuleEvent

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.hn
Class NetModuleEvent

    java.lang.Object
      java.util.EventObject
          org.ocap.hn.NetModuleEvent

All Implemented Interfaces:
  Serializable

    public class NetModuleEvent

extends EventObject

Entity for NetModule Event. There are two types of NetModule events: one that is generated by the NetManager when a NetModule is added or removed from the home network. Application may register as a listener to NetManager to receive such events. The other NetModuleEvent is generated by the NetModule itself when its internal state changes. Application should register as a listener with a particular NetModule for such events. In both scenarios, the NetModule that was the source of the event is returned.

See Also:
  Serialized Form

Field Summary
`static int` | `MODULE_ADDED` A constant indicating new module is registered to home network.
`static int` | `MODULE_BUSY` A constant indicating a module is busy and cannot respond to request now.
`static int` | `MODULE_REMOVED` A constant indicating a module is removed from home network.
`static int` | `MODULE_UPDATED` A constant indicating a module is updated from home network.
`static int` | `STATE_CHANGE` A constant indicating a module's internal status changed.

Constructor Summary
`NetModuleEvent(int type, Object source)` Constructs a NetModuleEvent by specifying type and source.

Method Summary
`Object` | `getSource()` Returns module event source, which is always a NetModule.
`int` | `getType()` Returns module event type, as defined in `NetModuleEvent`.

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

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### MODULE_ADDED

    public static final int MODULE_ADDED

  A constant indicating new module is registered to home network.

  See Also:
    Constant Field Values

### MODULE_REMOVED

    public static final int MODULE_REMOVED

  A constant indicating a module is removed from home network.

  See Also:
    Constant Field Values

### MODULE_UPDATED

    public static final int MODULE_UPDATED

  A constant indicating a module is updated from home network.

  See Also:
    Constant Field Values

### MODULE_BUSY

    public static final int MODULE_BUSY

  A constant indicating a module is busy and cannot respond to request now.

  See Also:
    Constant Field Values

### STATE_CHANGE

    public static final int STATE_CHANGE

  A constant indicating a module's internal status changed.

  See Also:
    Constant Field Values

Constructor Detail

### NetModuleEvent

    public NetModuleEvent(int type,
                          Object source)

  Constructs a NetModuleEvent by specifying type and source.

  Parameters:
    `type` - NetModule change type, allowed type are defined in `NetModuleEvent`
    `source` - NetModule where the change happens.

Method Detail

### getType

    public int getType()

  Returns module event type, as defined in `NetModuleEvent`.

  Returns:
    module event type

### getSource

    public Object getSource()

  Returns module event source, which is always a NetModule.

  Overrides:
    `getSource` in class `EventObject`
  Returns:
    module event source

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD