|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.llrp.ltk.net.LLRPConnection
public abstract class LLRPConnection
LLRPConnection represents an abstract interface for an LLRP connection at a LLRP reader or client. The actual implementation differ depending on whether it is a self-initiated connection or a remotely initiated connection.
Field Summary | |
---|---|
static int |
CONNECT_TIMEOUT
|
protected LLRPEndpoint |
endpoint
|
protected LLRPIoHandlerAdapter |
handler
|
protected org.apache.mina.common.IoSession |
session
|
static java.lang.String |
SYNC_MESSAGE_ANSWER
|
Constructor Summary | |
---|---|
LLRPConnection()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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.common.IoSession session
Constructor Detail |
---|
public LLRPConnection()
Method Detail |
---|
protected void checkLLRPConnectionAttemptStatus(long timeout) throws LLRPConnectionAttemptFailedException
timeout
- the wait time before reader replies with a status report
LLRPConnectionAttemptFailedException
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 sent
java.util.concurrent.TimeoutException
public LLRPMessage transact(LLRPMessage message, long transactionTimeout) throws java.util.concurrent.TimeoutException
message
- LLRP message to be senttransactionTimeout
- timeout
java.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 set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |