net.rim.device.api.io.nfc.llcp
Interface LLCPConnection

All Superinterfaces:
Connection

public interface LLCPConnection
extends Connection

Represents a Logical Link Control Protocol (LLCP) connection for peer-to-peer NFC communication. Used to manipulate connections opened with Connector.open(), where the connection string is of the form:

  • Since:
    BlackBerry API 7.1.0

    Field Summary
    static int CLIENT
              Indicates that the device is willing to operate as a client.
    static int SERVER
              Indicates that the device is willing to operate as a server.
    static int SERVER_PASSIVE
              Indicates that the device is willing to operate as a server, but will not be an active initiator.
     
    Method Summary
     InputStream getInputStream()
              Returns an InputStream for the connection.
     int getLocalMIU()
              Returns the local Maximum Information Unit (MIU).
     int getLocalSAP()
              Returns the local Service Access Point (SAP).
     int getMode()
              Indicates whether the connection was opened as a client or server.
     OutputStream getOutputStream()
              Returns an OutputStream for the connection.
     int getRemoteMIU()
              Returns the remote Maximum Information Unit (MIU).
     int getRemoteSAP()
              Returns the remote Service Access Point (SAP).
     String getServiceName()
              Returns the service name.
     
    Methods inherited from interface javax.microedition.io.Connection
    close
     



    Field Detail

    CLIENT

    static final int CLIENT
    Indicates that the device is willing to operate as a client. It is also used to represent the current mode when the device is running as a client.

    See Also:
    Constant Field Values
    Since:
    BlackBerry API 7.1.0

    SERVER

    static final int SERVER
    Indicates that the device is willing to operate as a server. It is also used to represent the current mode when the device is running as a server.

    See Also:
    Constant Field Values
    Since:
    BlackBerry API 7.1.0

    SERVER_PASSIVE

    static final int SERVER_PASSIVE
    Indicates that the device is willing to operate as a server, but will not be an active initiator. It is also used to represent the current mode when the device is running as a server in passive mode.

    See Also:
    Constant Field Values
    Since:
    BlackBerry API 7.1.0


    Method Detail

    getServiceName

    String getServiceName()
    Returns the service name.

    Returns:
    The service name.
    Since:
    BlackBerry API 7.1.0

    getInputStream

    InputStream getInputStream()
                               throws IOException
    Returns an InputStream for the connection.

    Returns:
    An InputStream for data exchange over this connection.
    Throws:
    IOException - If a valid InputStream for this LLCP connection cannot be returned.
    Since:
    BlackBerry API 7.1.0

    getOutputStream

    OutputStream getOutputStream()
                                 throws IOException
    Returns an OutputStream for the connection.

    Returns:
    An OutputStream for data exchange over this connection.
    Throws:
    IOException - If a valid OutputStream for this LLCP connection cannot be returned.
    Since:
    BlackBerry API 7.1.0

    getMode

    int getMode()
    Indicates whether the connection was opened as a client or server.

    Returns:
    LLCPConnection.CLIENT or LLCPConnection.SERVER.
    Since:
    BlackBerry API 7.1.0

    getRemoteSAP

    int getRemoteSAP()
                     throws IOException
    Returns the remote Service Access Point (SAP).

    Returns:
    The remote Service Access Point (SAP).
    Throws:
    IOException
    Since:
    BlackBerry API 7.1.0

    getRemoteMIU

    int getRemoteMIU()
                     throws IOException
    Returns the remote Maximum Information Unit (MIU).

    Returns:
    The remote Maximum Information Unit.
    Throws:
    IOException
    Since:
    BlackBerry API 7.1.0

    getLocalSAP

    int getLocalSAP()
                    throws IOException
    Returns the local Service Access Point (SAP).

    Returns:
    The local Service Access Point.
    Throws:
    IOException
    Since:
    BlackBerry API 7.1.0

    getLocalMIU

    int getLocalMIU()
                    throws IOException
    Returns the local Maximum Information Unit (MIU).

    Returns:
    The local Maximum Information Unit.
    Throws:
    IOException
    Since:
    BlackBerry API 7.1.0





    Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
    Java is a trademark of Oracle America Inc. in the US and other countries.
    Legal