|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ch.odi.net.PortListener
Description: This object listens on a port and passes incoming connections to a custom handler object. This is typically used by server side applications.
| Constructor Summary | |
PortListener()
Deprecated. You should not create empty PortListeners |
|
PortListener(int port,
ConnectionHandler handler)
Creates a new PortListener |
|
| Method Summary | |
void |
listen()
Starts listening on the port. |
void |
setConnectionHandler(ConnectionHandler handler)
Deprecated. You should not change the connection handler |
void |
setPort(int port)
Deprecated. You should not change the port |
void |
stopListening()
Stops listening on the port. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public PortListener()
public PortListener(int port,
ConnectionHandler handler)
port - The TCP port to wait for connections tohandler - The ConnectionHandler object that will take care of incoming connections| Method Detail |
public void setConnectionHandler(ConnectionHandler handler)
public void setPort(int port)
public void stopListening()
public void listen()
throws IOException
isStopped
method returns true.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||