IT. Expert System.

Android Reference

Messenger


android.os

Class Messenger

  • All Implemented Interfaces:
    Parcelable


    public final class Messenger
    extends Object
    implements Parcelable
    Reference to a Handler, which others can use to send messages to it. This allows for the implementation of message-based communication across processes, by creating a Messenger pointing to a Handler in one process, and handing that Messenger to another process.
    • Constructor Detail

      • Messenger

        public Messenger(Handler target)
        Create a new Messenger pointing to the given Handler. Any Message objects sent through this Messenger will appear in the Handler as if Handler.sendMessage(Message) had been called directly.
        Parameters:
        target - The Handler that will receive sent messages.
      • Messenger

        public Messenger(IBinder target)
        Create a Messenger from a raw IBinder, which had previously been retrieved with getBinder().
        Parameters:
        target - The IBinder this Messenger should communicate with.
    • Method Detail

      • send

        public void send(Message message)
                  throws RemoteException
        Send a Message to this Messenger's Handler.
        Parameters:
        message - The Message to send. Usually retrieved through Message.obtain().
        Throws:
        RemoteException - Throws DeadObjectException if the target Handler no longer exists.
      • getBinder

        public IBinder getBinder()
        Retrieve the IBinder that this Messenger is using to communicate with its associated Handler.
        Returns:
        Returns the IBinder backing this Messenger.
      • equals

        public boolean equals(Object otherObj)
        Comparison operator on two Messenger objects, such that true is returned then they both point to the same Handler.
        Overrides:
        equals in class Object
        Parameters:
        otherObj - the object to compare this instance with.
        Returns:
        true if the specified object is equal to this Object; false otherwise.
        See Also:
        Object.hashCode()
      • hashCode

        public int hashCode()
        Description copied from class: Object
        Returns an integer hash code for this object. By contract, any two objects for which Object.equals(java.lang.Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

        Note that hash values must not change over time unless information used in equals comparisons also changes.

        See Writing a correct hashCode method if you intend implementing your own hashCode method.

        Overrides:
        hashCode in class Object
        Returns:
        this object's hash code.
        See Also:
        Object.equals(java.lang.Object)
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • writeMessengerOrNullToParcel

        public static void writeMessengerOrNullToParcel(Messenger messenger,
                                        Parcel out)
        Convenience function for writing either a Messenger or null pointer to a Parcel. You must use this with readMessengerOrNullFromParcel(android.os.Parcel) for later reading it.
        Parameters:
        messenger - The Messenger to write, or null.
        out - Where to write the Messenger.
      • readMessengerOrNullFromParcel

        public static Messenger readMessengerOrNullFromParcel(Parcel in)
        Convenience function for reading either a Messenger or null pointer from a Parcel. You must have previously written the Messenger with writeMessengerOrNullToParcel(android.os.Messenger, android.os.Parcel).
        Parameters:
        in - The Parcel containing the written Messenger.
        Returns:
        Returns the Messenger read from the Parcel, or null if null had been written.


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: 137 / 158697646. Delta: 0.06352 с