|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcz.cuni.pogamut.Client.AgentAux
public class AgentAux
Auxiliary class providing support for storing logs to file, etc ...
| Field Summary | |
|---|---|
protected Agent |
agent
Agent wrapped by this decorator. |
protected AgentIterationEndListener |
flushingListener
Listener that will flush all stream handlers every STREAM_LOG_FLUSH_INTERVAL iterations. |
protected static int |
STREAM_LOG_FLUSH_INTERVAL
number of logic iterations between two flushes to log files |
protected java.util.Collection<java.util.logging.StreamHandler> |
streamHandlers
Set of all streamhandlers of this agent's logs. |
protected int |
streamLogFlushCounter
counter for log flush |
| Constructor Summary | |
|---|---|
AgentAux(Agent agent)
Creates a new instance of AgentAux |
|
| Method Summary | |
|---|---|
void |
logPlatformLogToFile(java.lang.String filePath)
Logs all messages from platform log to given file. |
void |
logPlatformLogToStream(java.util.logging.StreamHandler handler)
Logs all messages from platform log to given stream handler. |
private void |
logToStream(java.util.logging.Logger log,
java.util.logging.StreamHandler handler)
Logs all messages from a log to given stream handler. |
void |
logUserLogToFile(java.lang.String filePath)
Logs all messages from userlog to given file. |
void |
logUserLogToStream(java.util.logging.StreamHandler handler)
Logs all messages from userlog to given stream handler. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Agent agent
protected static final int STREAM_LOG_FLUSH_INTERVAL
protected int streamLogFlushCounter
protected java.util.Collection<java.util.logging.StreamHandler> streamHandlers
protected AgentIterationEndListener flushingListener
| Constructor Detail |
|---|
public AgentAux(Agent agent)
| Method Detail |
|---|
private void logToStream(java.util.logging.Logger log,
java.util.logging.StreamHandler handler)
public void logUserLogToFile(java.lang.String filePath)
throws java.io.IOException
java.io.IOException
public void logPlatformLogToFile(java.lang.String filePath)
throws java.io.IOException
java.io.IOExceptionpublic void logUserLogToStream(java.util.logging.StreamHandler handler)
public void logPlatformLogToStream(java.util.logging.StreamHandler handler)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||