|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.llrp.ltk.net.LLRPConnection
org.llrp.ltk.net.LLRPAcceptor
public class LLRPAcceptor
LLRPAcceptor implements a remotely initiated LLRP connection. Here is a simple code example:
LLRPAcceptor c = new LLRPAcceptor(endpoint);
c.bind();
// wait for incoming reader initiated connection .....
// send message asynchronously
c.send(llrpmessage);
// asynchronously LLRP messages arrive via LLRPEndpoint.messageReceived
// send message synchronously
LLRPMessage m = c.transact(llrpmessage);
| Field Summary | |
|---|---|
static int |
IDLE_TIME
|
| Fields inherited from class org.llrp.ltk.net.LLRPConnection |
|---|
CONNECT_TIMEOUT, endpoint, handler, session, SYNC_MESSAGE_ANSWER |
| Constructor Summary | |
|---|---|
LLRPAcceptor()
|
|
LLRPAcceptor(LLRPEndpoint endpoint)
creates a remotely initiated LLRP connection on default PORT 5084 and uses LLRPIoHandlerAdapterImpl by default |
|
LLRPAcceptor(LLRPEndpoint endpoint,
int port)
creates a remotely initiated LLRP connection and uses LLRPIoHandlerAdapterImpl by default |
|
LLRPAcceptor(LLRPEndpoint endpoint,
int port,
LLRPIoHandlerAdapter handler)
creates a remotely initiated LLRP connection and uses LLRPIoHandlerAdapterImpl by default |
|
LLRPAcceptor(LLRPEndpoint endpoint,
LLRPIoHandlerAdapter handler)
creates a remotely initiated LLRP connection on default PORT 5084 |
|
| Method Summary | |
|---|---|
void |
bind()
binds the LLRPIOHandler registered to the port specified. |
void |
bind(long timeout)
binds the LLRPIOHandler registered to the port specified. |
void |
close()
close acceptor socket. |
int |
getPort()
get host address of reader device. |
boolean |
reconnect()
reconnect method. |
void |
setPort(int port)
|
| Methods inherited from class org.llrp.ltk.net.LLRPConnection |
|---|
checkLLRPConnectionAttemptStatus, getEndpoint, getHandler, send, setEndpoint, setHandler, transact, transact |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int IDLE_TIME
| Constructor Detail |
|---|
public LLRPAcceptor()
public LLRPAcceptor(LLRPEndpoint endpoint)
endpoint - that handles incoming, asynchronous LLRP messages
public LLRPAcceptor(LLRPEndpoint endpoint,
int port)
endpoint - that handles incoming, asynchronous LLRP messagesport - on which LLRPAcceptor is waiting for incoming connections
public LLRPAcceptor(LLRPEndpoint endpoint,
int port,
LLRPIoHandlerAdapter handler)
endpoint - that handles incoming, asynchronous LLRP messagesport - on which LLRPAcceptor is waiting for incoming connectionshandler - which handles incoming LLRP messages
public LLRPAcceptor(LLRPEndpoint endpoint,
LLRPIoHandlerAdapter handler)
endpoint - that handles incoming, asynchronous LLRP messageshandler - which handles incoming LLRP messages| Method Detail |
|---|
public void bind()
throws LLRPConnectionAttemptFailedException
LLRPConnectionAttemptFailedException
public void bind(long timeout)
throws LLRPConnectionAttemptFailedException
timeout - time in ms
LLRPConnectionAttemptFailedException - if ConnectionAttemptStatus 'Success' in READER_NOTIFICATION
message is not received within time interval specified by timeoutpublic void close()
public boolean reconnect()
reconnect in class LLRPConnectionpublic int getPort()
public void setPort(int port)
port - the port to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||