Package gnu.io.factory
Class RFC2217PortCreator
- java.lang.Object
-
- gnu.io.factory.RFC2217PortCreator
-
- All Implemented Interfaces:
SerialPortCreator<TelnetSerialPort>
public class RFC2217PortCreator extends java.lang.Object implements SerialPortCreator<TelnetSerialPort>
-
-
Field Summary
-
Fields inherited from interface gnu.io.factory.SerialPortCreator
LOCAL
-
-
Constructor Summary
Constructors Constructor Description RFC2217PortCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TelnetSerialPortcreatePort(java.lang.String portName)Creates theSerialPortand opens it for communication.java.lang.StringgetProtocol()Gets the protocol type of the Port to create.booleanisApplicable(java.lang.String portName, java.lang.Class<TelnetSerialPort> expectedClass)Gets whether thisSerialPortCreatoris applicable to create and open the given port.
-
-
-
Method Detail
-
isApplicable
public boolean isApplicable(java.lang.String portName, java.lang.Class<TelnetSerialPort> expectedClass)Description copied from interface:SerialPortCreatorGets whether thisSerialPortCreatoris applicable to create and open the given port.- Specified by:
isApplicablein interfaceSerialPortCreator<TelnetSerialPort>- Parameters:
portName- The ports name.- Returns:
- Whether the port can be created and opened by this creator.
-
createPort
public TelnetSerialPort createPort(java.lang.String portName) throws NoSuchPortException, UnsupportedCommOperationException, PortInUseException
Description copied from interface:SerialPortCreatorCreates theSerialPortand opens it for communication.- Specified by:
createPortin interfaceSerialPortCreator<TelnetSerialPort>- Parameters:
portName- The ports name.- Returns:
- The created
SerialPort. - Throws:
UnsupportedCommOperationException- if connection to the remote serial port fails.NoSuchPortException- if the host does not exist.PortInUseException
-
getProtocol
public java.lang.String getProtocol()
Description copied from interface:SerialPortCreatorGets the protocol type of the Port to create.- Specified by:
getProtocolin interfaceSerialPortCreator<TelnetSerialPort>- Returns:
- The protocol type.
-
-