|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Propagates various communications port ownership events.
When a port is opened, a CommPortOwnership event
of type PORT_OWNED will be propagated.
When a port is closed, a CommPortOwnership event
of type PORT_UNOWNED will be propagated.
Multiple applications that are seeking ownership of a communications port can resolve their differences as follows:
open and takes ownership of port.
open sometime later.
open,
CommPortIdentifier will propagate a CommPortOwnership
event with the event type PORT_OWNERSHIP_REQUESTED.
close from within the
event callback.
CommPortIdentifier checks
to see if ownership was given up, and if so, turns over ownership
of the port to XYZapp by returning success from open.
close is called from within
a CommPortOwnership event callback,
a new CommPortOwnership event will
not be generated.
CommPort,
CommPortIdentifier,
EventListener| Field Summary | |
static int |
PORT_OWNED
The port just went from unowned to owned state, when an application successfully called CommPortIdentifier.open. |
static int |
PORT_OWNERSHIP_REQUESTED
Ownership contention. |
static int |
PORT_UNOWNED
The port just went from owned to unowned state, when the port's owner called CommPort.close. |
| Method Summary | |
void |
ownershipChange(int type)
Propagates a CommPortOwnership event. |
| Field Detail |
public static final int PORT_OWNED
CommPortIdentifier.open.
public static final int PORT_UNOWNED
CommPort.close.
public static final int PORT_OWNERSHIP_REQUESTED
CommPort.close during the processing
of this event and thereby give up ownership of the port.
| Method Detail |
public void ownershipChange(int type)
CommPortOwnership event.
This method will be called with the type set to one of
the variables PORT_OWNED, PORT_UNOWNED,
or PORT_OWNERSHIP_REQUESTED.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||