Configuration Platform SDK 7.6 API Reference

com.genesyslab.platform.commons.threading
Class SingleThreadInvoker

java.lang.Object
  extended bycom.genesyslab.platform.commons.threading.SingleThreadInvoker
All Implemented Interfaces:
AsyncInvoker

public class SingleThreadInvoker
extends java.lang.Object
implements AsyncInvoker

Invoker which performs its tasks in dedicated single thread. The thread is created upon creation of invoker itself and stoped on dispose(), so no tasks will be executed after invoker disposal.


Constructor Summary
SingleThreadInvoker()
           
SingleThreadInvoker(java.lang.String name)
           
SingleThreadInvoker(java.lang.String name, int queueSize)
           
 
Method Summary
 void dispose()
          Makes a hint to invoker that it's not used anymore and, PROBABLY, should be stoped and all assotiated resources - freed.
 void invoke(java.lang.Runnable target)
          Submit the task to this invoker.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleThreadInvoker

public SingleThreadInvoker()

SingleThreadInvoker

public SingleThreadInvoker(java.lang.String name)

SingleThreadInvoker

public SingleThreadInvoker(java.lang.String name,
                           int queueSize)
Method Detail

invoke

public void invoke(java.lang.Runnable target)
Description copied from interface: AsyncInvoker
Submit the task to this invoker.

Specified by:
invoke in interface AsyncInvoker
Parameters:
target - Task to execute

dispose

public void dispose()
Description copied from interface: AsyncInvoker
Makes a hint to invoker that it's not used anymore and, PROBABLY, should be stoped and all assotiated resources - freed. Note that Invoker is usually shared between multiple channels, so call of this method from one channel doesn't mean it is really free.

Specified by:
dispose in interface AsyncInvoker

Configuration Platform SDK 7.6 API Reference

Send comments on this topic.
Copyright © 2006–2008 Genesys Telecommunication Laboratories, Inc. All rights reserved.