|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.controllerModel.sunrise.connectionLib.ConnectionListener
public class ConnectionListener
A connection listener connects a message handler and a connection lib channel using a ConnectionReceiver and HandlingWorker.
| Constructor Summary | |
|---|---|
ConnectionListener(Connection inChannel,
IMessageHandler handler)
Creates a new ConnectionListener with a single handling thread. |
|
ConnectionListener(Connection inChannel,
IMessageHandler handler,
int workerCount)
Creates a new ConnectionListener. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes the listener. |
boolean |
isConnected()
Checks if the listener is active, which means that the connection is still active. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionListener(Connection inChannel,
IMessageHandler handler)
Starts immediately to listen for messages on the given channel. If a message is received, the given handler is called.
inChannel - The channel on which messages are received.handler - The handler which handles incoming messages
public ConnectionListener(Connection inChannel,
IMessageHandler handler,
int workerCount)
Starts immediately to listen for messages on the given channel. If a message is received, the given handler is called.
inChannel - The channel on which messages are received.handler - The handler which handles incoming messagesworkerCount - The worker count defines how many threads will be used to
handle the messages and pass them to the defined message
handler. If the value is greater than 1, the handler must be
thread-safe, because messages will be handled in parallel!| Method Detail |
|---|
public void dispose()
Will not throw an exception.
public boolean isConnected()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||