Package org.nfctools.llcp.pdu

Examples of org.nfctools.llcp.pdu.Disconnect


    assertEquals("Hello", new String(information.getServiceDataUnit()));
    processPdu = new ReceiveReady(information.getSourceServiceAccessPoint(),
        information.getDestinationServiceAccessPoint(), 1).processPdu(connectionManager);
    assertTrue(processPdu.toString(), processPdu instanceof Disconnect);

    Disconnect disconnect = (Disconnect)processPdu;
    processPdu = new DisconnectedMode(disconnect.getSourceServiceAccessPoint(),
        disconnect.getDestinationServiceAccessPoint(), 0).processPdu(connectionManager);

    assertEquals(0, connectionManager.getOpenConnectionsSize());
    assertFalse(serviceAccessPoint.isConnected());
    assertSymmetryState();
  }
View Full Code Here


    assertTrue(processPdu.toString(), processPdu instanceof ReceiveReady);
    ReceiveReady receiveReady = (ReceiveReady)processPdu;
    assertEquals(1, receiveReady.getReceived());
    assertEquals(0, receiveReady.getSend());

    processPdu = new Disconnect(32, 32).processPdu(connectionManager);
    assertTrue(processPdu.toString(), processPdu instanceof DisconnectedMode);

    assertEquals(0, connectionManager.getOpenConnectionsSize());
    assertFalse(serviceAccessPoint.isConnected());
    assertEquals("Hello", serviceAccessPoint.getMessageReceived());
View Full Code Here

  public int getMaximumInformationUnit() {
    return maximumInformationUnitExtension + LlcpConstants.DEFAULT_MIU;
  }

  public void disconnect() {
    messageToSend = new Disconnect(addressPair.getRemote(), addressPair.getLocal());
  }
View Full Code Here

      aggreeOnMiux(parameters, llcpSocket);
      llcpSocket.onConnectSucceeded();
      return handleMessageToSend(llcpSocket);
    }
    else
      return new Disconnect(remoteAddress, localAddress); // TODO Frame reject
  }
View Full Code Here

TOP

Related Classes of org.nfctools.llcp.pdu.Disconnect

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.