org.nfctools.llcp
Interface ServiceAccessPoint

All Known Implementing Classes:
AbstractReceivingServiceAccessPoint, AbstractSnepImpl, NdefPushLlcpService, SnepClient, SnepServer

public interface ServiceAccessPoint

Interface specification for Service Points that can communicate over a LLCP stack.


Method Summary
 boolean canAcceptConnection(Object[] parameters)
          Called if the other party wants to connect to this service.
 void onConnectFailed()
          Called if a connection failed/timed out.
 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.
 byte[] onInformation(byte[] serviceDataUnit)
          Called if the other party has send a message or as a response to a send message from this implementation.
 void onLlcpActive(Llcp llcp)
          Called if there is a device in range and the LLCP stack is active.
 void onSendFailed()
          Called if a sendMessage failed.
 void onSendSucceeded(LlcpSocket llcpSocket)
          Called if a sendMessage was successful and the other party responded with receive ready.
 

Method Detail

onLlcpActive

void onLlcpActive(Llcp llcp)
Called if there is a device in range and the LLCP stack is active.

Parameters:
llcp -

onConnectionActive

void onConnectionActive(LlcpSocket llcpSocket)
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,

Parameters:
llcpSocket -

onConnectFailed

void onConnectFailed()
Called if a connection failed/timed out.


onConnectSucceeded

void onConnectSucceeded(LlcpSocket llcpSocket)
Called if a connection succeeded and the other party is ready to receive data.

Parameters:
llcpSocket -

onSendSucceeded

void onSendSucceeded(LlcpSocket llcpSocket)
Called if a sendMessage was successful and the other party responded with receive ready.

Parameters:
llcpSocket -

onSendFailed

void onSendFailed()
Called if a sendMessage failed.


canAcceptConnection

boolean canAcceptConnection(Object[] parameters)
Called if the other party wants to connect to this service.

Parameters:
parameters -
Returns:

onInformation

byte[] onInformation(byte[] serviceDataUnit)
Called if the other party has send a message or as a response to a send message from this implementation. If this implementation has something to respond this data has to be returned here. If the returned byte array is null the LLCP stack will answer with receive ready.

Parameters:
serviceDataUnit -
Returns:
nullable byte array as response

onDisconnect

void onDisconnect()
Called if the other party ended the connection or the LLCP stack ended.



Copyright © 2012. All Rights Reserved.