|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jason.core.AbstractService | +--jason.core.ThreadableService | +--jason.core.service.InnerService | +--jason.core.service.LogService
Created Thu May 9 18:16:13 2002
This is a log service that get all message from other service and store it in a message file
Field Summary | |
protected java.util.Vector |
messages
|
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 | |
LogService()
|
Method Summary | |
protected void |
cleanMessages()
|
java.io.File |
getLogLocation()
|
boolean |
isOverride()
This service type is 'overridable' |
ServiceResponse |
manageRequest(ServiceRequest request)
Manage a message request |
void |
notifyInitReady()
Initialize the log service by using the Log tag attribute from the jason.xml file |
protected void |
notifyStopReady()
This method is called at the end of the stop method |
protected void |
run()
User should override this method for running a task. |
void |
setLog(java.io.File logLocation)
Define the path for storing log message by default this is the "log" path |
void |
stop()
stop the service |
protected void |
writeException(java.lang.Exception exc,
java.io.RandomAccessFile raf)
Write an exception to the raf |
protected void |
writeMessage(java.lang.String message,
java.io.RandomAccessFile raf)
Write a service message on the raf |
protected void |
writeMessages()
Store the file message en flush it |
Methods inherited from class jason.core.ThreadableService |
actionForStart, enableServiceForThread, getThreadLoopDelay, isThreadLoopMode, isThreadStarted, isWaiting, notifyThreadRunning, runThread, setPriority, setThreadLoopDelay, setThreadLoopMode, threadNotify, threadWait |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static ServiceType TYPE
protected java.util.Vector messages
Constructor Detail |
public LogService()
Method Detail |
public void setLog(java.io.File logLocation)
public void notifyInitReady()
notifyInitReady
in class AbstractService
public java.io.File getLogLocation()
protected void run()
AbstractService
setThreadLoopMode
method
run
in class AbstractService
protected void notifyStopReady()
AbstractService
stop
method
notifyStopReady
in class AbstractService
public void stop()
Service
stop
in interface Service
stop
in class AbstractService
protected void cleanMessages()
protected void writeMessages()
protected void writeException(java.lang.Exception exc, java.io.RandomAccessFile raf) throws java.io.IOException
java.io.IOException
protected void writeMessage(java.lang.String message, java.io.RandomAccessFile raf) throws java.io.IOException
java.io.IOException
public ServiceResponse manageRequest(ServiceRequest request) throws ServiceException
manageRequest
in interface Service
manageRequest
in class AbstractService
ServiceException
public boolean isOverride()
isOverride
in interface Service
isOverride
in class AbstractService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |