/**@class android.os.MessageQueue.OnFileDescriptorEventListener A listener which is invoked when file descriptor related events occur. */ var OnFileDescriptorEventListener = { /** File descriptor event: Indicates that the file descriptor is ready for input operations, such as reading. <p> The listener should read all available data from the file descriptor then return <code>true</code> to keep the listener active or <code>false</code> to remove the listener. </p><p> In the case of a socket, this event may be generated to indicate that there is at least one incoming connection that the listener should accept. </p><p> This event will only be generated if the {@link #EVENT_INPUT} event mask was specified when the listener was added. </p> */ EVENT_INPUT : "1", /** File descriptor event: Indicates that the file descriptor is ready for output operations, such as writing. <p> The listener should write as much data as it needs. If it could not write everything at once, then it should return <code>true</code> to keep the listener active. Otherwise, it should return <code>false</code> to remove the listener then re-register it later when it needs to write something else. </p><p> This event will only be generated if the {@link #EVENT_OUTPUT} event mask was specified when the listener was added. </p> */ EVENT_OUTPUT : "2", /** File descriptor event: Indicates that the file descriptor encountered a fatal error. <p> File descriptor errors can occur for various reasons. One common error is when the remote peer of a socket or pipe closes its end of the connection. </p><p> This event may be generated at any time regardless of whether the {@link #EVENT_ERROR} event mask was specified when the listener was added. </p> */ EVENT_ERROR : "4", /**Called when a file descriptor receives events. @param {Object {FileDescriptor}} fd The file descriptor. @param {Number} events The set of events that occurred: a combination of the {@link #EVENT_INPUT}, {@link #EVENT_OUTPUT}, and {@link #EVENT_ERROR} event masks. @return {Number} The new set of events to watch, or 0 to unregister the listener. @see #EVENT_INPUT @see #EVENT_OUTPUT @see #EVENT_ERROR */ onFileDescriptorEvents : function( ) {}, };