org.nfctools.snep
Class SnepClient

java.lang.Object
  extended by org.nfctools.snep.AbstractSnepImpl
      extended by org.nfctools.snep.SnepClient
All Implemented Interfaces:
ServiceAccessPoint

public class SnepClient
extends AbstractSnepImpl


Field Summary
 
Fields inherited from class org.nfctools.snep.AbstractSnepImpl
continueMessage, fragmentIterator, maxInformationUnit, reader, snepVersion
 
Constructor Summary
SnepClient()
           
 
Method Summary
 boolean canAcceptConnection(Object[] parameters)
          Called if the other party wants to connect to this service.
 void onConnectionActive(LlcpSocket llcpSocket)
          Called if this Service has an active connection.
 void onConnectSucceeded(LlcpSocket llcpSocket)
          Called if a connection succeeded and the other party is ready to receive data.
 void onDisconnect()
          Called if the other party ended the connection or the LLCP stack ended.
 void onLlcpActive(Llcp llcp)
          Called if there is a device in range and the LLCP stack is active.
 void onSendSucceeded(LlcpSocket llcpSocket)
          Called if a sendMessage was successful and the other party responded with receive ready.
protected  byte[] processMessage(SnepMessage snepMessage)
           
 void setSnepAgentListener(SnepAgentListener snepAgentListener)
           
 
Methods inherited from class org.nfctools.snep.AbstractSnepImpl
onConnectFailed, onInformation, onSendFailed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnepClient

public SnepClient()
Method Detail

setSnepAgentListener

public void setSnepAgentListener(SnepAgentListener snepAgentListener)

onLlcpActive

public void onLlcpActive(Llcp llcp)
Description copied from interface: ServiceAccessPoint
Called if there is a device in range and the LLCP stack is active.

Specified by:
onLlcpActive in interface ServiceAccessPoint
Overrides:
onLlcpActive in class AbstractSnepImpl

onConnectionActive

public void onConnectionActive(LlcpSocket llcpSocket)
Description copied from interface: ServiceAccessPoint
Called if this Service has an active connection. If the implementation does not invoke any method on the LlcpSocket the LLCP stack will send a Symmetry packet,

Specified by:
onConnectionActive in interface ServiceAccessPoint
Overrides:
onConnectionActive in class AbstractSnepImpl

onConnectSucceeded

public void onConnectSucceeded(LlcpSocket llcpSocket)
Description copied from interface: ServiceAccessPoint
Called if a connection succeeded and the other party is ready to receive data.

Specified by:
onConnectSucceeded in interface ServiceAccessPoint
Overrides:
onConnectSucceeded in class AbstractSnepImpl

onDisconnect

public void onDisconnect()
Description copied from interface: ServiceAccessPoint
Called if the other party ended the connection or the LLCP stack ended.

Specified by:
onDisconnect in interface ServiceAccessPoint
Overrides:
onDisconnect in class AbstractSnepImpl

onSendSucceeded

public void onSendSucceeded(LlcpSocket llcpSocket)
Description copied from interface: ServiceAccessPoint
Called if a sendMessage was successful and the other party responded with receive ready.


canAcceptConnection

public boolean canAcceptConnection(Object[] parameters)
Description copied from interface: ServiceAccessPoint
Called if the other party wants to connect to this service.

Returns:

processMessage

protected byte[] processMessage(SnepMessage snepMessage)
Specified by:
processMessage in class AbstractSnepImpl


Copyright © 2012. All Rights Reserved.