public class PortListener extends Object implements Runnable
PortListener.ConnectionManager.ConnectionManager| Constructor and Description |
|---|
PortListener(String name,
String ip,
int port,
int floodprot)
Constructs a PortListener instance.
|
| Modifier and Type | Method and Description |
|---|---|
ConnectionManager |
getConnectionManager()
Returns reference to ConnectionManager instance associated
with the PortListener.
|
String |
getName()
Returns the name of this
PortListener. |
boolean |
isAvailable()
Tests if this
PortListener is available. |
void |
run()
Listen constantly to a server socket and handles incoming connections
through the associated {a:link ConnectionManager}.
|
void |
setAvailable(boolean b)
Sets the availability flag of this
PortListener. |
void |
setConnectionManager(ConnectionManager connectionManager) |
void |
start()
Starts this
PortListener. |
void |
stop()
Stops this
PortListener, and returns
when everything was stopped successfully. |
public String getName()
PortListener.String.public boolean isAvailable()
PortListener is available.public void setAvailable(boolean b)
PortListener.b - true if to be available, false otherwise.public void start()
PortListener.public void stop()
PortListener, and returns
when everything was stopped successfully.public void run()
run in interface RunnableConnectionManagerpublic ConnectionManager getConnectionManager()
public void setConnectionManager(ConnectionManager connectionManager)
Copyright © 2023. All rights reserved.