WireAdminEvent objects are delivered to all registered
WireAdminListener service objects which specify an interest in the
WireAdminEvent type. Events must be delivered in chronological order
with respect to each listener. For example, a WireAdminEvent of type
WIRE_CONNECTED must be delivered before a WireAdminEvent of
type WIRE_DISCONNECTED for a particular Wire object.
A type code is used to identify the type of event. The following event types are defined:
WIRE_CREATEDWIRE_CONNECTEDWIRE_UPDATEDWIRE_TRACEWIRE_DISCONNECTEDWIRE_DELETEDPRODUCER_EXCEPTIONCONSUMER_EXCEPTIONEvent type values must be unique and disjoint bit values. Event types must be defined as a bit in a 32 bit integer and can thus be bitwise ORed together.
Security Considerations. WireAdminEvent objects contain Wire
objects. Care must be taken in the sharing of Wire objects with other
bundles.
WireAdminListener
| Modifier and Type | Field and Description |
|---|---|
| public static final int | CONSUMER_EXCEPTION
A Consumer service method has thrown an exception. |
| public static final int | PRODUCER_EXCEPTION
A Producer service method has thrown an exception. |
| private final ServiceReference | reference
The WireAdmin service which created this event. |
| private final Throwable | throwable
Exception associates with this the event. |
| private final int | type
Type of this event. |
| private final Wire | wire
The |
| public static final int | WIRE_CONNECTED
The |
| public static final int | WIRE_CREATED
A |
| public static final int | WIRE_DELETED
A |
| public static final int | WIRE_DISCONNECTED
The |
| public static final int | WIRE_TRACE
The |
| public static final int | WIRE_UPDATED
A |
| Access | Constructor and Description |
|---|---|
| public | WireAdminEvent(ServiceReference<WireAdmin>
The reference, int ServiceReference object of the Wire Admin
service that created this event.The event type. See type, Wire getType().The wire, Throwable Wire object associated with this event.An exception associated with this event. This may be
exception)null if no exception is associated with this event.Constructs a |
| Modifier and Type | Method and Description |
|---|---|
| public ServiceReference | Returns: TheServiceReference object for the Wire Admin service
that created this event.Return the |
| public Throwable | Returns: An exception ornull if no exception is associated with
this event.Returns the exception associated with the event, if any. |
| public int | |
| public Wire | Returns: TheWire object associated with this event or
null when no Wire object is associated with the
event.Return the |
| CONSUMER_EXCEPTION | back to summary |
|---|---|
| public static final int CONSUMER_EXCEPTION A Consumer service method has thrown an exception.
This
The value of | |
| PRODUCER_EXCEPTION | back to summary |
|---|---|
| public static final int PRODUCER_EXCEPTION A Producer service method has thrown an exception.
This
The value of | |
| reference | back to summary |
|---|---|
| private final ServiceReference<WireAdmin> reference The WireAdmin service which created this event. | |
| throwable | back to summary |
|---|---|
| private final Throwable throwable Exception associates with this the event. | |
| type | back to summary |
|---|---|
| private final int type Type of this event.
| |
| wire | back to summary |
|---|---|
| private final Wire wire The | |
| WIRE_CONNECTED | back to summary |
|---|---|
| public static final int WIRE_CONNECTED The
The value of | |
| WIRE_CREATED | back to summary |
|---|---|
| public static final int WIRE_CREATED A
This
The value of | |
| WIRE_DELETED | back to summary |
|---|---|
| public static final int WIRE_DELETED A
This
The value of | |
| WIRE_DISCONNECTED | back to summary |
|---|---|
| public static final int WIRE_DISCONNECTED The
The value of | |
| WIRE_TRACE | back to summary |
|---|---|
| public static final int WIRE_TRACE The
The value of | |
| WIRE_UPDATED | back to summary |
|---|---|
| public static final int WIRE_UPDATED A
This
The value of | |
| WireAdminEvent | back to summary |
|---|---|
| public WireAdminEvent(ServiceReference<WireAdmin> reference, int type, Wire wire, Throwable exception) Constructs a
| |
| getServiceReference | back to summary |
|---|---|
| public ServiceReference Return the
| |
| getThrowable | back to summary |
|---|---|
| public Throwable getThrowable() Returns the exception associated with the event, if any.
| |
| getType | back to summary |
|---|---|
| public int getType() Return the type of this event. The type values are:
| |
| getWire | back to summary |
|---|---|
| public Wire getWire() Return the
| |