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 TelnetSerialPort
createPort(java.lang.String portName)
Creates theSerialPort
and opens it for communication.java.lang.String
getProtocol()
Gets the protocol type of the Port to create.boolean
isApplicable(java.lang.String portName, java.lang.Class<TelnetSerialPort> expectedClass)
Gets whether thisSerialPortCreator
is 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:SerialPortCreator
Gets whether thisSerialPortCreator
is applicable to create and open the given port.- Specified by:
isApplicable
in 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:SerialPortCreator
Creates theSerialPort
and opens it for communication.- Specified by:
createPort
in 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:SerialPortCreator
Gets the protocol type of the Port to create.- Specified by:
getProtocol
in interfaceSerialPortCreator<TelnetSerialPort>
- Returns:
- The protocol type.
-
-