comm
Interface CommPortIdentifierInterface

All Known Implementing Classes:
CommPortIdentifier

public interface CommPortIdentifierInterface

User: lyon Date: Jul 30, 2006 Time: 7:39:58 AM Copyright DocJava, Inc. 2005.


Method Summary
 void addPortOwnershipListener(CommPortOwnershipListener listener)
          Adds the specified listener to the list of ownership listeners for this port.
 java.lang.String getCurrentOwner()
          Returns the current owner of this port.
 java.lang.String getName()
          Returns the port name, typically an OS-dependent hardware label.
 int getPortType()
          Returns the port type, PORT_SERIAL or PORT_PARALLEL.
 boolean isCurrentlyOwned()
          Indicates whether this port is currently owned.
 CommPortInterface open(java.io.FileDescriptor fd)
          Opens this port using a file descriptor.
 CommPortInterface open(java.lang.String appName, int timeout)
          Opens this communications port.
 void removePortOwnershipListener(CommPortOwnershipListener listener)
          Removes the specified listener from the list of ownership listeners for this port.
 

Method Detail

getName

java.lang.String getName()
Returns the port name, typically an OS-dependent hardware label.


getPortType

int getPortType()
Returns the port type, PORT_SERIAL or PORT_PARALLEL.


getCurrentOwner

java.lang.String getCurrentOwner()
Returns the current owner of this port.


isCurrentlyOwned

boolean isCurrentlyOwned()
Indicates whether this port is currently owned.


open

CommPortInterface open(java.lang.String appName,
                       int timeout)
                       throws PortInUseException
Opens this communications port. If the port is in use by another application, it will be notified with a PORT_OWNERSHIP_REQUESTED event. If the current owner closes the port, then this method will succeed. Otherwise a PortInUseException will be thrown.

Parameters:
appName - the name of the application requesting the port
timeout - number of miliseconds to wait for the port to open
Throws:
PortInUseException

open

CommPortInterface open(java.io.FileDescriptor fd)
                       throws UnsupportedCommOperationException
Opens this port using a file descriptor.

Parameters:
fd - the file descriptor
Throws:
UnsupportedCommOperationException - if the platform does not support this functionality

addPortOwnershipListener

void addPortOwnershipListener(CommPortOwnershipListener listener)
Adds the specified listener to the list of ownership listeners for this port.

Parameters:
listener - the ownership listener to add

removePortOwnershipListener

void removePortOwnershipListener(CommPortOwnershipListener listener)
Removes the specified listener from the list of ownership listeners for this port.

Parameters:
listener - the ownership listener to remove