All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface javax.comm.CommPortOwnershipListener

public interface CommPortOwnershipListener
extends EventListener
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:

Note: When a close is called from within a CommPortOwnership event callback, a new CommPortOwnership event will not be generated.

See Also:
CommPort, CommPortIdentifier, EventListener

Variable Index

 o PORT_OWNED
The port just went from unowned to owned state, when an application successfully called CommPortIdentifier.open.
 o PORT_OWNERSHIP_REQUESTED
Ownership contention.
 o PORT_UNOWNED
The port just went from owned to unowned state, when the port's owner called CommPort.close.

Method Index

 o ownershipChange(int)
Propagates a CommPortOwnership event.

Variables

 o PORT_OWNED
 public static final int PORT_OWNED
The port just went from unowned to owned state, when an application successfully called CommPortIdentifier.open.

 o PORT_UNOWNED
 public static final int PORT_UNOWNED
The port just went from owned to unowned state, when the port's owner called CommPort.close.

 o PORT_OWNERSHIP_REQUESTED
 public static final int PORT_OWNERSHIP_REQUESTED
Ownership contention. The port is owned by one application and another application wants ownership. If the owner of this port is listening to this event, it can call CommPort.close during the processing of this event and thereby give up ownership of the port.

Methods

 o ownershipChange
 public abstract void ownershipChange(int type)
Propagates a CommPortOwnership event. This method will be called with the type set to one of the variables PORT_OWNED, PORT_UNOWNED, or PORT_OWNERSHIP_REQUESTED.


All Packages  Class Hierarchy  This Package  Previous  Next  Index