jason.core.service
Class Scheduler

java.lang.Object
  |
  +--jason.core.AbstractService
        |
        +--jason.core.ThreadableService
              |
              +--jason.core.service.InnerService
                    |
                    +--jason.core.service.Scheduler
All Implemented Interfaces:
java.io.Serializable, Service, ServiceDataListener

public class Scheduler
extends jason.core.service.InnerService

See Also:
Serialized Form

Field Summary
static ServiceType TYPE
           
 
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
Scheduler()
          By default this service is not starting as a thread for limiting cost for no SchedulableService instance
 
Method Summary
 boolean isOverride()
          This service type is 'overridable'
 ServiceResponse manageRequest(ServiceRequest request)
          Manage a schedulable request
protected  void processSchedulableService(SchedulableService s)
           
protected  void resetStartingDataTable(SchedulableService s)
           
protected  void run()
          User should override this method for running a task.
 
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, isPersistent, isPrivate, isProcessable, isStarted, isStopped, isTest, isThreadable, isVerbose, manageRequestForType, notifyData, notifyInitReady, notifyStartReady, notifyStopReady, postStop, restart, 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
 

Field Detail

TYPE

public static ServiceType TYPE
Constructor Detail

Scheduler

public Scheduler()
By default this service is not starting as a thread for limiting cost for no SchedulableService instance

Method Detail

manageRequest

public ServiceResponse manageRequest(ServiceRequest request)
                              throws ServiceException
Manage a schedulable request

Specified by:
manageRequest in interface Service
Overrides:
manageRequest in class AbstractService
Returns:
the request's response
ServiceException

processSchedulableService

protected void processSchedulableService(SchedulableService s)

run

protected void run()
Description copied from class: AbstractService
User should override this method for running a task. This is the core of the service running state. Note that you shouldn't use a main loop like for standard thread. You just have to notify that this service use a main loop for the setThreadLoopMode method

Overrides:
run in class AbstractService

resetStartingDataTable

protected void resetStartingDataTable(SchedulableService s)

isOverride

public boolean isOverride()
This service type is 'overridable'

Specified by:
isOverride in interface Service
Overrides:
isOverride in class AbstractService
Returns:
true if the service can be replaced by another service with the same type