@Test public void testConnectWellKnownServiceWithServiceUnavailable() throws Exception { DummyServiceAccessPoint serviceAccessPoint = new DummyServiceAccessPoint(COM_ANDROID_NPP); serviceAccessPoint.setAcceptConnections(false); connectionManager.registerWellKnownServiceAccessPoint(COM_ANDROID_NPP, serviceAccessPoint); Connect connect = new Connect(0x01, 0x32, new ServiceName(COM_ANDROID_NPP)); AbstractProtocolDataUnit processPdu = connect.processPdu(connectionManager); assertTrue(processPdu instanceof DisconnectedMode); assertEquals(3, ((DisconnectedMode)processPdu).getReason()); }
public void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint) { serviceDiscovery.registerSerivce(serviceName, serviceAccessPoint); }
LlcpConnectionManager implements Llcp { public void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint) { serviceDiscovery.registerSerivce(serviceName, serviceAccessPoint); } }
LlcpConnectionManager implements Llcp { public void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint) { serviceDiscovery.registerSerivce(serviceName, serviceAccessPoint); }  }
LlcpConnectionManager implements Llcp { public void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint) { serviceDiscovery.registerSerivce(serviceName, serviceAccessPoint); }  void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint); void registerServiceAccessPoint(ServiceAccessPoint serviceAccessPoint); void registerServiceAccessPoint(int serviceAddress, ServiceAccessPoint serviceAccessPoint); void clearConnections(); ServiceAccessPoint getServiceAccessPoint(int address, String serviceName); Collection<Object> getParameter(); AbstractProtocolDataUnit onLlcpActive(); AbstractProtocolDataUnit onConnectComplete(int remoteAddress, int localAddress, Object[] parameters); @Override void connectToService(String serviceName, ServiceAccessPoint serviceAccessPoint); @Override void connectToService(int serviceAddress, ServiceAccessPoint serviceAccessPoint); AbstractProtocolDataUnit onSendConfirmed(int remoteAddress, int localAddress, int receivedSequence); AbstractProtocolDataUnit onConnect(int remoteAddress, int localAddress, Object[] parameters); void init(Object[] parameters); int getOpenConnectionsSize(); AbstractProtocolDataUnit onReceiveInformation(int remoteAddress, int localAddress, int received, int send,
			byte[] serviceDataUnit); AbstractProtocolDataUnit onDisconnect(int remoteAddress, int localAddress); AbstractProtocolDataUnit onDisconnectedMode(int remoteAddress, int localAddress, int reason); }
LlcpConnectionManager implements Llcp { public void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint) { serviceDiscovery.registerSerivce(serviceName, serviceAccessPoint); }  void registerWellKnownServiceAccessPoint(String serviceName, ServiceAccessPoint serviceAccessPoint); void registerServiceAccessPoint(ServiceAccessPoint serviceAccessPoint); void registerServiceAccessPoint(int serviceAddress, ServiceAccessPoint serviceAccessPoint); void clearConnections(); ServiceAccessPoint getServiceAccessPoint(int address, String serviceName); Collection<Object> getParameter(); AbstractProtocolDataUnit onLlcpActive(); AbstractProtocolDataUnit onConnectComplete(int remoteAddress, int localAddress, Object[] parameters); @Override void connectToService(String serviceName, ServiceAccessPoint serviceAccessPoint); @Override void connectToService(int serviceAddress, ServiceAccessPoint serviceAccessPoint); AbstractProtocolDataUnit onSendConfirmed(int remoteAddress, int localAddress, int receivedSequence); AbstractProtocolDataUnit onConnect(int remoteAddress, int localAddress, Object[] parameters); void init(Object[] parameters); int getOpenConnectionsSize(); AbstractProtocolDataUnit onReceiveInformation(int remoteAddress, int localAddress, int received, int send,
			byte[] serviceDataUnit); AbstractProtocolDataUnit onDisconnect(int remoteAddress, int localAddress); AbstractProtocolDataUnit onDisconnectedMode(int remoteAddress, int localAddress, int reason);  }