Create BTGOEP Notifierparamnotifier notifier for transport layerexceptionIOException if an error occured while service record creation this.notifier = notifier; try { ServiceRecord servRec = LocalDevice.getLocalDevice(). getRecord(notifier); DataElement protocolList = null; synchronized (servRec) { protocolList = servRec.getAttributeValue( ServiceRecordImpl.PROTOCOL_DESCRIPTOR_LIST); DataElement p = new DataElement(DataElement.DATSEQ); p.addElement(DE_OBEX_UUID); // obex UUID protocolList.addElement(p); servRec.setAttributeValue( ServiceRecordImpl.PROTOCOL_DESCRIPTOR_LIST, protocolList); } } catch (BluetoothStateException e) { throw new IOException(e.getMessage()); }
this.notifier = notifier; try { ServiceRecord servRec = LocalDevice.getLocalDevice(). getRecord(notifier); DataElement protocolList = null; synchronized (servRec) { protocolList = servRec.getAttributeValue( ServiceRecordImpl.PROTOCOL_DESCRIPTOR_LIST); DataElement p = new DataElement(DataElement.DATSEQ); p.addElement(DE_OBEX_UUID); // obex UUID protocolList.addElement(p); servRec.setAttributeValue( ServiceRecordImpl.PROTOCOL_DESCRIPTOR_LIST, protocolList); } } catch (BluetoothStateException e) { throw new IOException(e.getMessage()); }
Accepts client connection to the service this notifier is assigned to.returnconnection to a client just accepted on transport layer.exceptionIOException if an error occured on transport layer. return createTransportConnection( (StreamConnection)(notifier.acceptAndOpen()));
return createTransportConnection( (StreamConnection)(notifier.acceptAndOpen()));
Closes this notifier on the transport layerexceptionIOException if an error occured on transport layer notifier.close();
notifier.close();
Create btgoep transport connection.paramsock transport connectionreturnBTGOEP Connection return new BTGOEPConnection(sock);
return new BTGOEPConnection(sock);
Get transport connection noifierreturntransport notifier return notifier;
return notifier;