org.iperg.part.log.j2se
Class IpLatLogManager

java.lang.Object
  extended by org.iperg.part.log.j2se.IpLatLogManager
All Implemented Interfaces:
IpEventHandler, IpLogManager

public class IpLatLogManager
extends java.lang.Object
implements IpLogManager, IpEventHandler

The IpLatLogManager implements a manager that logs property events (ADD, SET and REMOVE) to logiles in a format accepted by the IPerG Logfile Analysis and Evaluation tool.

Note that after instantiating the Lat log manager, the log method shouldn't be called, since the manager is able to catch all property events by itself. In fact, if log is indeed called, an exception will be thrown.


Constructor Summary
IpLatLogManager(java.lang.String logFileDir, java.lang.String logFileName)
          Constructur used to create a new Lat log manager.
 
Method Summary
 void handleEvent(IpEvent event)
          Is called by PART whenever an event has been generated in the local process or received from the network.
 void log(java.lang.String message)
          Write a message to the log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IpLatLogManager

public IpLatLogManager(java.lang.String logFileDir,
                       java.lang.String logFileName)
Constructur used to create a new Lat log manager.

Parameters:
logFileDir - Directory where the log file should be placed
logFileName - The name of the log file. Note that the name should not include an extension, the extension '.lat' will be added by the manager itself.
Method Detail

handleEvent

public void handleEvent(IpEvent event)
Is called by PART whenever an event has been generated in the local process or received from the network.

Specified by:
handleEvent in interface IpEventHandler
Parameters:
event - The event

log

public void log(java.lang.String message)
         throws java.io.IOException
Write a message to the log. The message that ends up on the log will have the following form:

TT:MM:SS - message

For example

12:04:58 - A game object was created

Specified by:
log in interface IpLogManager
Parameters:
message - The message to write to the log
Throws:
java.io.IOException - If an IO exception occurs while writing the message