jason.core
Class TaskableService

java.lang.Object
  |
  +--jason.core.AbstractService
        |
        +--jason.core.ThreadableService
              |
              +--jason.core.TaskableService
All Implemented Interfaces:
java.io.Serializable, Service, ServiceDataListener
Direct Known Subclasses:
SocketService

public class TaskableService
extends ThreadableService

Created Wed May 15 18:45:45 2002

This method will handle user Task. This is an important class for thread load balancing because it is able to use the a thread pooling system with a delegated TaskManager

See Also:
ThreadableService, AbstractService, Service, Task, Serialized Form

Field Summary
 
Fields inherited from class jason.core.ThreadableService
activeThread
 
Fields inherited from class jason.core.AbstractService
INITIALIZED, name, NOSTATE, serviceContext, STARTED, STOPPED
 
Fields inherited from interface jason.core.Service
ERROR_MESSAGE, INFORMATION_MESSAGE, VERBOSE_MESSAGE, WARNING_MESSAGE
 
Constructor Summary
TaskableService()
           
TaskableService(boolean autoStart)
          This constructor will let the service be started as a thread automatically with the start method.
 
Method Summary
protected  void notifyTask(Task task)
          This method will dispatch ths task in a new thread or in a queue if no thread are available.
 
Methods inherited from class jason.core.ThreadableService
actionForStart, enableServiceForThread, getThreadLoopDelay, isThreadLoopMode, isThreadStarted, isWaiting, notifyThreadRunning, runThread, setPriority, setThreadLoopDelay, setThreadLoopMode, threadNotify, threadWait
 
Methods inherited from class jason.core.AbstractService
checkForContext, fireCriticalErrorDetected, getBooleanProperty, getInfo, getIntProperty, getName, getPropertiesName, getProperty, getServiceContext, getServiceState, getState, getStringProperty, getType, getVersion, hasServiceContext, init, isAutoStop, isEnabled, isInitialized, isOverride, isPersistent, isPrivate, isProcessable, isStarted, isStopped, isTest, isThreadable, isVerbose, manageRequest, manageRequestForType, notifyData, notifyInitReady, notifyStartReady, notifyStopReady, postStop, restart, run, sendCustomMessage, sendErrorMessage, sendInformationMessage, sendInnerError, sendWarningMessage, setAutoStop, setEnabled, setName, setPersistent, setPrivate, setProperty, setServiceContext, setTest, setType, setVerbose, setVersion, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskableService

public TaskableService()

TaskableService

public TaskableService(boolean autoStart)
This constructor will let the service be started as a thread automatically with the start method.

Parameters:
autoStart - true for starting the service as a thread automatically
Method Detail

notifyTask

protected void notifyTask(Task task)
This method will dispatch ths task in a new thread or in a queue if no thread are available.

Parameters:
task - a user Task object