Package org.jline.builtins.telnet
Class PortListener
java.lang.Object
org.jline.builtins.telnet.PortListener
-
Constructor Summary
ConstructorsConstructorDescriptionPortListener(String name, String ip, int port, int floodprot) Constructs a PortListener instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns reference to ConnectionManager instance associated with the PortListener.getName()Returns the name of thisPortListener.booleanTests if thisPortListeneris available.voidrun()Listen constantly to a server socket and handles incoming connections through the associated {a:link ConnectionManager}.voidsetAvailable(boolean b) Sets the availability flag of thisPortListener.voidsetConnectionManager(ConnectionManager connectionManager) voidstart()Starts thisPortListener.voidstop()Stops thisPortListener, and returns when everything was stopped successfully.
-
Constructor Details
-
PortListener
-
-
Method Details
-
getName
-
isAvailable
public boolean isAvailable()Tests if thisPortListeneris available.- Returns:
- true if available, false otherwise.
-
setAvailable
public void setAvailable(boolean b) Sets the availability flag of thisPortListener.- Parameters:
b- true if to be available, false otherwise.
-
start
public void start()Starts thisPortListener. -
stop
public void stop()Stops thisPortListener, and returns when everything was stopped successfully. -
run
-
getConnectionManager
Returns reference to ConnectionManager instance associated with the PortListener.- Returns:
- the associated ConnectionManager.
-
setConnectionManager
-