IT. Expert System.

Android Reference

SessionNotifier


javax.obex

Interface SessionNotifier



  • public interface SessionNotifier
    The SessionNotifier interface defines a connection notifier for server-side OBEX connections. When a SessionNotifier is created and calls acceptAndOpen(), it will begin listening for clients to create a connection at the transport layer. When the transport layer connection is received, the acceptAndOpen() method will return a javax.microedition.io.Connection that is the connection to the client. The acceptAndOpen() method also takes a ServerRequestHandler argument that will process the requests from the client that connects to the server.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      ObexSession acceptAndOpen(ServerRequestHandler handler)
      Waits for a transport layer connection to be established and specifies the handler to handle the requests from the client.
      ObexSession acceptAndOpen(ServerRequestHandler handler, Authenticator auth)
      Waits for a transport layer connection to be established and specifies the handler to handle the requests from the client and the Authenticator to use to respond to authentication challenge and authentication response headers.
    • Method Detail

      • acceptAndOpen

        ObexSession acceptAndOpen(ServerRequestHandler handler)
                                  throws IOException
        Waits for a transport layer connection to be established and specifies the handler to handle the requests from the client. No authenticator is associated with this connection, therefore, it is implementation dependent as to how an authentication challenge and authentication response header will be received and processed.

        Additional Note for OBEX over Bluetooth

        If this method is called on a SessionNotifier object that does not have a ServiceRecord in the SDDB, the ServiceRecord for this object will be added to the SDDB. This method requests the BCC to put the local device in connectable mode so that it will respond to connection attempts by clients.

        The following checks are done to verify that the service record provided is valid. If any of these checks fail, then a ServiceRegistrationException is thrown.

        • ServiceClassIDList and ProtocolDescriptorList, the mandatory service attributes for a btgoep service record, must be present in the ServiceRecord associated with this notifier.
        • L2CAP, RFCOMM and OBEX must all be in the ProtocolDescriptorList
        • The ServiceRecord associated with this notifier must not have changed the RFCOMM server channel number

        This method will not ensure that ServiceRecord associated with this notifier 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.

        Parameters:
        handler - the request handler that will respond to OBEX requests
        Returns:
        the connection to the client
        Throws:
        IOException - if an error occurs in the transport layer
        NullPointerException - if handler is null
      • acceptAndOpen

        ObexSession acceptAndOpen(ServerRequestHandler handler,
                                Authenticator auth)
                                  throws IOException
        Waits for a transport layer connection to be established and specifies the handler to handle the requests from the client and the Authenticator to use to respond to authentication challenge and authentication response headers.

        Additional Note for OBEX over Bluetooth

        If this method is called on a SessionNotifier object that does not have a ServiceRecord in the SDDB, the ServiceRecord for this object will be added to the SDDB. This method requests the BCC to put the local device in connectable mode so that it will respond to connection attempts by clients.

        The following checks are done to verify that the service record provided is valid. If any of these checks fail, then a ServiceRegistrationException is thrown.

        • ServiceClassIDList and ProtocolDescriptorList, the mandatory service attributes for a btgoep service record, must be present in the ServiceRecord associated with this notifier.
        • L2CAP, RFCOMM and OBEX must all be in the ProtocolDescriptorList
        • The ServiceRecord associated with this notifier must not have changed the RFCOMM server channel number

        This method will not ensure that ServiceRecord associated with this notifier 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.

        Parameters:
        handler - the request handler that will respond to OBEX requests
        auth - the Authenticator to use with this connection; if null then no Authenticator will be used
        Returns:
        the connection to the client
        Throws:
        IOException - if an error occurs in the transport layer
        NullPointerException - if handler is null


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 457 / 158666211. Delta: 0.03128 с