Package org.nfctools.llcp

Examples of org.nfctools.llcp.LlcpConnectionManagerFactory


  public SnepDemo() {
    LoggingNdefListener loggingNdefListener = new LoggingNdefListener();
    final SnepServer snepServer = new SnepServer(loggingNdefListener);
    snepClient = new SnepClient();
    llcpOverNfcip = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        connectionManager.registerServiceAccessPoint(SnepConstants.SNEP_SERVICE_ADDRESS, snepServer);
        connectionManager.registerServiceAccessPoint(snepClient);
View Full Code Here


  public void run() {
    final SnepServer snepServer = new SnepServer(new LoggingNdefListener());
    final SnepClient snepClient = new SnepClient();
    ndefPushLlcpService = new NdefPushLlcpService(ndefListener);
    LlcpOverNfcip llcpOverNfcip = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        connectionManager.registerWellKnownServiceAccessPoint(LlcpConstants.COM_ANDROID_NPP,
            ndefPushLlcpService);
View Full Code Here

      @Override
      public void onNdefPushFailed() {
      }
    });
    LlcpOverNfcip llcpOverNfcip = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        connectionManager.registerWellKnownServiceAccessPoint(LlcpConstants.COM_ANDROID_NPP,
            ndefPushLlcpService);
View Full Code Here

  private LlcpOverNfcip llcpOverNfcip;

  public LlcpDemo(boolean initiatorMode) {
    this.initiatorMode = initiatorMode;
    ndefPushLlcpService = new NdefPushLlcpService(new LoggingNdefListener());
    llcpOverNfcip = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        connectionManager.registerWellKnownServiceAccessPoint(LlcpConstants.COM_ANDROID_NPP,
            ndefPushLlcpService);
View Full Code Here

      final NdefListener initiatorNdefListener, final NdefPushLlcpService targetNdefPushLlcpService) {
    final NfcipConnectionDummy initiator = new NfcipConnectionDummy(true, LlcpConstants.initiatorGeneralBytes);
    final NfcipConnectionDummy target = new NfcipConnectionDummy(false, LlcpConstants.initiatorGeneralBytes);
    initiator.setOther(target);
    target.setOther(initiator);
    initiatorLlcp = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        if (snepServer != null) {
          connectionManager.registerWellKnownServiceAccessPoint(SnepConstants.SNEP_SERVICE_NAME, snepServer);
          connectionManager.registerServiceAccessPoint(SnepConstants.SNEP_SERVICE_ADDRESS, snepServer);
        }
        if (initiatorNdefListener != null) {
          NdefPushLlcpService ndefPushLlcpService = new NdefPushLlcpService(initiatorNdefListener);
          connectionManager.registerWellKnownServiceAccessPoint(LlcpConstants.COM_ANDROID_NPP,
              ndefPushLlcpService);
        }
      }
    });
    targetLlcp = new LlcpOverNfcip(new LlcpConnectionManagerFactory() {

      @Override
      protected void configureConnectionManager(LlcpConnectionManager connectionManager) {
        if (snepClient != null)
          connectionManager.registerServiceAccessPoint(snepClient);
View Full Code Here

TOP

Related Classes of org.nfctools.llcp.LlcpConnectionManagerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.