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