Package purejavacomm
Class CommPortIdentifier
- java.lang.Object
-
- purejavacomm.CommPortIdentifier
-
public class CommPortIdentifier extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intPORT_PARALLELstatic intPORT_SERIAL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddPortName(String portName, int portType, CommDriver driver)This has not been tested at allvoidaddPortOwnershipListener(CommPortOwnershipListener listener)booleanequals(Object x)StringgetCurrentOwner()StringgetName()static CommPortIdentifiergetPortIdentifier(String portName)static CommPortIdentifiergetPortIdentifier(CommPort port)static Enumeration<CommPortIdentifier>getPortIdentifiers()intgetPortType()inthashCode()booleanisCurrentlyOwned()CommPortopen(FileDescriptor fd)CommPortopen(String appname, int timeout)voidremovePortOwnershipListener(CommPortOwnershipListener listener)
-
-
-
Field Detail
-
PORT_SERIAL
public static final int PORT_SERIAL
- See Also:
- Constant Field Values
-
PORT_PARALLEL
public static final int PORT_PARALLEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
addPortName
public static void addPortName(String portName, int portType, CommDriver driver)
This has not been tested at all
-
getPortIdentifier
public static CommPortIdentifier getPortIdentifier(String portName) throws NoSuchPortException
- Throws:
NoSuchPortException
-
getPortIdentifier
public static CommPortIdentifier getPortIdentifier(CommPort port) throws NoSuchPortException
- Throws:
NoSuchPortException
-
open
public CommPort open(String appname, int timeout) throws PortInUseException
- Throws:
PortInUseException
-
open
public CommPort open(FileDescriptor fd) throws UnsupportedCommOperationException
-
getName
public String getName()
-
getPortType
public int getPortType()
-
getPortIdentifiers
public static Enumeration<CommPortIdentifier> getPortIdentifiers()
-
getCurrentOwner
public String getCurrentOwner()
-
isCurrentlyOwned
public boolean isCurrentlyOwned()
-
addPortOwnershipListener
public void addPortOwnershipListener(CommPortOwnershipListener listener)
-
removePortOwnershipListener
public void removePortOwnershipListener(CommPortOwnershipListener listener)
-
-