IT. Expert System.

Android Reference

LinkSocketNotifier


android.net

Interface LinkSocketNotifier



  • public interface LinkSocketNotifier
    Interface used to get feedback about a LinkSocket. Instance is optionally passed when a LinkSocket is constructed. Multiple LinkSockets may use the same notifier.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      boolean onBetterLinkAvailable(LinkSocket original, LinkSocket duplicate)
      This callback function will be called if a better link becomes available.
      void onCapabilitiesChanged(LinkSocket socket, LinkCapabilities changedCapabilities)
      This callback function will be called when any of the notification-marked capabilities of the LinkSocket (e.g.
      void onLinkLost(LinkSocket socket)
      This callback function will be called when a LinkSocket no longer has an active link.
      void onNewLinkUnavailable(LinkSocket socket)
      This callback function will be called when an application calls requestNewLink on a LinkSocket but the LinkSocket is unable to find a suitable new link.
    • Method Detail

      • onBetterLinkAvailable

        boolean onBetterLinkAvailable(LinkSocket original,
                                    LinkSocket duplicate)
        This callback function will be called if a better link becomes available. TODO - this shouldn't be checked for all cases - what's the conditional flag? If the duplicate socket is accepted, the original will be marked invalid and additional use will throw exceptions.
        Parameters:
        original - the original LinkSocket
        duplicate - the new LinkSocket that better meets the application requirements
        Returns:
        true if the application intends to use this link REM TODO - how agressive should we be? At a minimum CS tracks which LS have this turned on and tracks the requirements When a new link becomes available, automatically check if any of the LinkSockets will care. If found, grab a refcount on the link so it doesn't go away and send notification Optionally, periodically setup connection on available networks to check for better links Maybe pass this info into the LinkFactories so condition changes can be acted on more quickly
      • onLinkLost

        void onLinkLost(LinkSocket socket)
        This callback function will be called when a LinkSocket no longer has an active link.
        Parameters:
        socket - the LinkSocket that lost its link REM NetworkStateTracker tells us it is disconnected CS checks the table for LS on that link CS calls each callback (need to work out p2p cross process callback)
      • onNewLinkUnavailable

        void onNewLinkUnavailable(LinkSocket socket)
        This callback function will be called when an application calls requestNewLink on a LinkSocket but the LinkSocket is unable to find a suitable new link.
        Parameters:
        socket - the LinkSocket for which a new link was not found TODO - why the diff between initial request (sync) and requestNewLink? REM CS process of trying to find a new link must track the LS that started it on failure, call callback
      • onCapabilitiesChanged

        void onCapabilitiesChanged(LinkSocket socket,
                                 LinkCapabilities changedCapabilities)
        This callback function will be called when any of the notification-marked capabilities of the LinkSocket (e.g. upstream bandwidth) have changed.
        Parameters:
        socket - the linkSocet for which capabilities have changed
        changedCapabilities - the set of capabilities that the application is interested in and have changed (with new values) REM Maybe pass the interesting capabilities into the Links. Get notified of every capability change check for LinkSockets on that Link that are interested in that Capability - call them


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: 262 / 158855596. Delta: 0.03810 с