P
- the device type the event is defined for.public class RegistrationEvent<P extends Device<? super P>>
extends java.util.EventObject
RegistrationEvent
class encapsulates device registration and unregistration
conditions.DeviceManager
,
RegistrationListener
,
Serialized FormConstructor and Description |
---|
RegistrationEvent(DeviceDescriptor<P> descriptor)
Creates a new
RegistrationEvent with the specified device descriptor and
initiator. |
RegistrationEvent(java.lang.String initiator,
DeviceDescriptor<P> descriptor)
Creates a new
RegistrationEvent with the specified device descriptor and
initiator. |
Modifier and Type | Method and Description |
---|---|
DeviceDescriptor<P> |
getDescriptor()
Returns the identifying and descriptive information of the registered or unregistered
device.
|
java.lang.String |
getInitiator()
Returns the free-formed name of the registration/unregistration initiator.
|
public RegistrationEvent(java.lang.String initiator, DeviceDescriptor<P> descriptor)
RegistrationEvent
with the specified device descriptor and
initiator.initiator
- the free-formed name of the initiator of the registration or unregistration; or
null
if none is defined.descriptor
- the identifying and descriptive information of the registered or unregistered
device.java.lang.NullPointerException
- if descriptor
is null
.public RegistrationEvent(DeviceDescriptor<P> descriptor)
RegistrationEvent
with the specified device descriptor and
initiator.descriptor
- the identifying and descriptive information of the registered or unregistered
device.java.lang.NullPointerException
- if descriptor
is null
.public DeviceDescriptor<P> getDescriptor()
public java.lang.String getInitiator()
String
name identifying the initiator; or null
if none is defined.Copyright © 2012, 2014, Oracle and/or its affiliates. All rights reserved.
Legal Notices