public class LLRPAcceptor extends LLRPConnection
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);
Modifier and Type | Field and Description |
---|---|
static int |
IDLE_TIME |
CONNECT_TIMEOUT, endpoint, handler, session, SYNC_MESSAGE_ANSWER
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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) |
checkLLRPConnectionAttemptStatus, getEndpoint, getHandler, send, setEndpoint, setHandler, transact, transact
public static final int IDLE_TIME
public LLRPAcceptor()
public LLRPAcceptor(LLRPEndpoint endpoint)
endpoint
- that handles incoming, asynchronous LLRP messagespublic LLRPAcceptor(LLRPEndpoint endpoint, int port)
endpoint
- that handles incoming, asynchronous LLRP messagesport
- on which LLRPAcceptor is waiting for incoming connectionspublic 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 messagespublic LLRPAcceptor(LLRPEndpoint endpoint, LLRPIoHandlerAdapter handler)
endpoint
- that handles incoming, asynchronous LLRP messageshandler
- which handles incoming LLRP messagespublic void bind() throws LLRPConnectionAttemptFailedException
public void bind(long timeout) throws LLRPConnectionAttemptFailedException
timeout
- time in msLLRPConnectionAttemptFailedException
- if ConnectionAttemptStatus 'Success' in READER_NOTIFICATION
message is not received within time interval specified by timeoutpublic void close()
public boolean reconnect()
reconnect
in class LLRPConnection
public int getPort()
public void setPort(int port)
port
- the port to setCopyright © 2007 ETH Zurich.