org.fusesource.hawtdispatch
Interface DispatchObject

All Superinterfaces:
Suspendable
All Known Subinterfaces:
CustomDispatchSource<Event,MergedEvent>, DispatchQueue, DispatchSource

public interface DispatchObject
extends Suspendable

Implemented by dispatch objects that can be configured with a target queue that it uses for executing the object's asynchronous tasks.

Author:
Hiram Chirino

Method Summary
 DispatchQueue getTargetQueue()
           Gets the target queue for this object.
 void setTargetQueue(DispatchQueue queue)
           Sets the target queue for this object.
 
Methods inherited from interface org.fusesource.hawtdispatch.Suspendable
isSuspended, resume, suspend
 

Method Detail

setTargetQueue

void setTargetQueue(DispatchQueue queue)

Sets the target queue for this object.

An object's target queue is responsible for processing the object.

A dispatch queue's priority is inherited by its target queue. Use the Dispatch.getGlobalQueue() method to obtain suitable target queue of the desired priority.

A dispatch source's target queue specifies where its event handler and cancellation handler runnables will be submitted.

Parameters:
queue - The new target queue for the object. The queue is retained, and the previous one, if any, is released. The result of passing NULL in this parameter is undefined.

getTargetQueue

DispatchQueue getTargetQueue()

Gets the target queue for this object.

Returns:
the target queue of this object.
See Also:
setTargetQueue(DispatchQueue)


Copyright © 2010-2012 FuseSource, Corp.. All Rights Reserved.