org.llrp.ltk.net
Class LLRPIoHandlerAdapter

java.lang.Object
  extended by org.apache.mina.common.IoHandlerAdapter
      extended by org.llrp.ltk.net.LLRPIoHandlerAdapter
All Implemented Interfaces:
org.apache.mina.common.IoHandler
Direct Known Subclasses:
LLRPIoHandlerAdapterImpl

public abstract class LLRPIoHandlerAdapter
extends org.apache.mina.common.IoHandlerAdapter

LLRPIoHandlerAdapter defines abstract methods that need to be implemented by any LLRPIoHandlerAdaptor implementation in addition to the methods defined by the Apache MINA IoHandler interface.


Constructor Summary
LLRPIoHandlerAdapter()
           
 
Method Summary
abstract  LLRPConnection getConnection()
          gets connection on which handler is operating
abstract  java.util.concurrent.BlockingQueue<ConnectionAttemptEvent> getConnectionAttemptEventQueue()
          returns queue with all incoming ConnectionAttemptEvent parameters which were embedded in READER_NOTIFICATION messages.
abstract  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.
abstract  boolean isKeepAliveAck()
          returns true if incoming KEEP_ALIVE messages are being acknowledged.
abstract  boolean isKeepAliveForward()
          returns true if incoming KEEP_ALIVE messages are being forwarded to the LLRPEndpoint.
abstract  void setConnection(LLRPConnection connection)
          sets connection on which handler is operating
abstract  void setKeepAliveAck(boolean keepAliveAck)
          set whether incoming KEEP_ALIVE messages should be acknowledged.
abstract  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
exceptionCaught, messageReceived, messageSent, sessionClosed, sessionCreated, sessionIdle, sessionOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LLRPIoHandlerAdapter

public LLRPIoHandlerAdapter()
Method Detail

isKeepAliveAck

public abstract boolean isKeepAliveAck()
returns true if incoming KEEP_ALIVE messages are being acknowledged.


setKeepAliveAck

public abstract void setKeepAliveAck(boolean keepAliveAck)
set whether incoming KEEP_ALIVE messages should be acknowledged. Default case is that KEEP_ALIVE messages are acknowledged.

Parameters:
keepAliveAck - true if KEEP_ALIVE messages are to be acknowledged

isKeepAliveForward

public abstract boolean isKeepAliveForward()
returns true if incoming KEEP_ALIVE messages are being forwarded to the LLRPEndpoint.

Returns:
keepAliveForward true if KEEP_ALIVE messages are forwarded, false otherwise

setKeepAliveForward

public abstract void setKeepAliveForward(boolean keepAliveForward)
set whether incoming KEEP_ALIVE messages are being forwarded to the LLRPEndpoint. Default is with forwarding off.

Parameters:
keepAliveForward - true if KEEP_ALIVE messages are to be forwarded

getSynMessageQueue

public abstract 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. This method is required by the transact (synchronous message sending) of the LLRP connections.


getConnectionAttemptEventQueue

public abstract java.util.concurrent.BlockingQueue<ConnectionAttemptEvent> getConnectionAttemptEventQueue()
returns queue with all incoming ConnectionAttemptEvent parameters which were embedded in READER_NOTIFICATION messages. The getConnectionAttemptEventQueue method is used to fetch any ConnectionAttemptEvent that arrived in READER_NOTIFICATION messages. These events are used by LLRPConnection objects to check whether the connection could be established successfully.


getConnection

public abstract LLRPConnection getConnection()
gets connection on which handler is operating

Returns:
connection

setConnection

public abstract void setConnection(LLRPConnection connection)
sets connection on which handler is operating

Parameters:
connection -


Copyright © 2007 ETH Zurich.