public abstract class LLRPConnection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CONNECT_TIMEOUT |
protected LLRPEndpoint |
endpoint |
protected LLRPIoHandlerAdapter |
handler |
protected org.apache.mina.core.session.IoSession |
session |
static java.lang.String |
SYNC_MESSAGE_ANSWER |
Constructor and Description |
---|
LLRPConnection() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkLLRPConnectionAttemptStatus(long timeout)
check whether ConnectionAttemptStatus in READER_NOTIFICATION message was set by reader
to 'Success'.
|
LLRPEndpoint |
getEndpoint()
returns the endpoint which receives incoming LLRPMessages
|
LLRPIoHandlerAdapter |
getHandler()
returns the handler that handles incoming LLRPMessages and forwards them to LLRPEndpoint registered.
|
abstract boolean |
reconnect()
reconnect to existing connection
|
void |
send(LLRPMessage message)
sends an LLRP message without waiting for a response message.
|
void |
setEndpoint(LLRPEndpoint endpoint)
sets the endpoint which receives incoming LLRPMessages
|
void |
setHandler(LLRPIoHandlerAdapter handler)
sets the handler that handles incoming LLRPMessages and forwards them to LLRPEndpoint registered.
|
LLRPMessage |
transact(LLRPMessage message)
sends an LLRP message and returns the response message as defined in the
LLRP specification.
|
LLRPMessage |
transact(LLRPMessage message,
long transactionTimeout)
sends an LLRP message and returns the response message as defined in the
LLRP specification timing out after the time interval specified.
|
public static final int CONNECT_TIMEOUT
public static final java.lang.String SYNC_MESSAGE_ANSWER
protected LLRPEndpoint endpoint
protected LLRPIoHandlerAdapter handler
protected org.apache.mina.core.session.IoSession session
protected void checkLLRPConnectionAttemptStatus(long timeout) throws LLRPConnectionAttemptFailedException
timeout
- the wait time before reader replies with a status reportLLRPConnectionAttemptFailedException
public abstract boolean reconnect()
public void send(LLRPMessage message)
message
- LLRP message to be sentpublic LLRPMessage transact(LLRPMessage message) throws java.util.concurrent.TimeoutException
message
- LLRP message to be sentjava.util.concurrent.TimeoutException
public LLRPMessage transact(LLRPMessage message, long transactionTimeout) throws java.util.concurrent.TimeoutException
message
- LLRP message to be senttransactionTimeout
- timeoutjava.util.concurrent.TimeoutException
public LLRPEndpoint getEndpoint()
public void setEndpoint(LLRPEndpoint endpoint)
endpoint
- the endpoint to setpublic LLRPIoHandlerAdapter getHandler()
public void setHandler(LLRPIoHandlerAdapter handler)
handler
- the handler to setCopyright © 2007 ETH Zurich.