|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The L2CAPConnectionNotifier
interface provides
an L2CAP connection notifier.
To create a server connection, the protocol must be
btl2cap
. The target contains "localhost:" and the UUID of the
service. The parameters are ReceiveMTU and TransmitMTU, the same parameters
used to define a client connection. Here is an example of a valid server connection
string:
btl2cap://localhost:3B9FA89520078C303355AAA694238F07;ReceiveMTU=512;TransmitMTU=512
A call to Connector.open() with this string will return a
javax.bluetooth.L2CAPConnectionNotifier
object. An
L2CAPConnection
object is obtained from the
L2CAPConnectionNotifier
by calling the method
acceptAndOpen()
.
Method Summary | |
L2CAPConnection |
acceptAndOpen()
Waits for a client to connect to this L2CAP service. |
Methods inherited from interface javax.microedition.io.Connection |
close |
Method Detail |
public L2CAPConnection acceptAndOpen() throws java.io.IOException
L2CAPConnection
that can be used to communicate with this client.
A service record associated with this connection will be
added to the SDDB associated with this
L2CAPConnectionNotifier
object if one does not
exist in the SDDB. This method will put the
local device in connectable mode so that it may respond to
connection attempts by clients.
The following checks are done to verify that any
modifications made by the application to the service record
after it was created by Connector.open()
have not
created an invalid service record. If any of these checks
fail, then a ServiceRegistrationException
is thrown.
btl2cap
service record,
must be present in the service record.
This method will not ensure that the service record created is a completely valid service record. It is the responsibility of the application to ensure that the service record follows all of the applicable syntactic and semantic rules for service record correctness.
acceptAndOpen()
is called
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |