|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.common.IoHandlerAdapter
org.llrp.ltk.net.LLRPIoHandlerAdapter
org.llrp.ltk.net.LLRPIoHandlerAdapterImpl
public class LLRPIoHandlerAdapterImpl
LLRPIoHandlerAdapterImpl is the default implementation of the LLRPIoHandlerAdapter. It handles incoming messages: routes incoming asynchronous messages to the LLRPEndpoint registered, replies to KEEP_ALIVE messages and handles incoming READER_NOTIFICATION messages and responses to synchronous calls.
| Constructor Summary | |
|---|---|
LLRPIoHandlerAdapterImpl()
|
|
LLRPIoHandlerAdapterImpl(LLRPConnection connection)
|
|
| Method Summary | |
|---|---|
void |
exceptionCaught(org.apache.mina.common.IoSession session,
java.lang.Throwable cause)
|
LLRPConnection |
getConnection()
gets connection on which handler is operating |
java.util.concurrent.BlockingQueue<ConnectionAttemptEvent> |
getConnectionAttemptEventQueue()
returns queue with all incoming ConnectionAttemptEvent parameters which were embedded in READER_NOTIFICATION messages. |
java.util.concurrent.BlockingQueue<LLRPMessage> |
getSynMessageQueue()
returns queue of all incoming messages where the messages type is equal to the one specified in the IoSession parameter LLRPConnection.SYNC_MESSAGE_ANSWER. |
boolean |
isKeepAliveAck()
returns true if incoming KEEP_ALIVE messages are being acknowledged. |
boolean |
isKeepAliveForward()
returns true if incoming KEEP_ALIVE messages are being forwarded to the LLRPEndpoint. |
void |
messageReceived(org.apache.mina.common.IoSession session,
java.lang.Object message)
is called whenever an LLRP Message is received. |
void |
messageSent(org.apache.mina.common.IoSession session,
java.lang.Object message)
|
void |
sessionIdle(org.apache.mina.common.IoSession session,
org.apache.mina.common.IdleStatus status)
|
void |
sessionOpened(org.apache.mina.common.IoSession session)
|
void |
setConnection(LLRPConnection connection)
sets connection on which handler is operating |
void |
setKeepAliveAck(boolean keepAliveAck)
set whether incoming KEEP_ALIVE messages should be acknowledged. |
void |
setKeepAliveForward(boolean keepAliveForward)
set whether incoming KEEP_ALIVE messages are being forwarded to the LLRPEndpoint. |
| Methods inherited from class org.apache.mina.common.IoHandlerAdapter |
|---|
sessionClosed, sessionCreated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LLRPIoHandlerAdapterImpl(LLRPConnection connection)
public LLRPIoHandlerAdapterImpl()
| Method Detail |
|---|
public void sessionOpened(org.apache.mina.common.IoSession session)
throws java.lang.Exception
sessionOpened in interface org.apache.mina.common.IoHandlersessionOpened in class org.apache.mina.common.IoHandlerAdapterjava.lang.Exception
public void messageReceived(org.apache.mina.common.IoSession session,
java.lang.Object message)
throws java.lang.Exception
messageReceived in interface org.apache.mina.common.IoHandlermessageReceived in class org.apache.mina.common.IoHandlerAdapterjava.lang.Exception
public void messageSent(org.apache.mina.common.IoSession session,
java.lang.Object message)
throws java.lang.Exception
messageSent in interface org.apache.mina.common.IoHandlermessageSent in class org.apache.mina.common.IoHandlerAdapterjava.lang.Exception
public void exceptionCaught(org.apache.mina.common.IoSession session,
java.lang.Throwable cause)
throws java.lang.Exception
exceptionCaught in interface org.apache.mina.common.IoHandlerexceptionCaught in class org.apache.mina.common.IoHandlerAdapterjava.lang.Exception
public void sessionIdle(org.apache.mina.common.IoSession session,
org.apache.mina.common.IdleStatus status)
throws java.lang.Exception
sessionIdle in interface org.apache.mina.common.IoHandlersessionIdle in class org.apache.mina.common.IoHandlerAdapterjava.lang.Exceptionpublic java.util.concurrent.BlockingQueue<LLRPMessage> getSynMessageQueue()
getSynMessageQueue in class LLRPIoHandlerAdapterpublic java.util.concurrent.BlockingQueue<ConnectionAttemptEvent> getConnectionAttemptEventQueue()
getConnectionAttemptEventQueue in class LLRPIoHandlerAdapterpublic boolean isKeepAliveAck()
isKeepAliveAck in class LLRPIoHandlerAdapterpublic void setKeepAliveAck(boolean keepAliveAck)
setKeepAliveAck in class LLRPIoHandlerAdapterkeepAliveAck - true if KEEP_ALIVE messages are to be acknowledgedpublic boolean isKeepAliveForward()
isKeepAliveForward in class LLRPIoHandlerAdapterpublic void setKeepAliveForward(boolean keepAliveForward)
setKeepAliveForward in class LLRPIoHandlerAdapterkeepAliveForward - true if KEEP_ALIVE messages are to be forwardedpublic LLRPConnection getConnection()
getConnection in class LLRPIoHandlerAdapterpublic void setConnection(LLRPConnection connection)
setConnection in class LLRPIoHandlerAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||