public class DefaultEventExit extends Object implements EventInterface2
Constructor and Description |
---|
DefaultEventExit()
The constructor reads the file name for event logging from
"server.ini".
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of the class instance.
|
long |
getEventFileLength()
Gets the current event file length.
|
String |
getEventFileName()
Gets the current event file name.
|
long |
getMaximumFileSize()
Gets the maximum file size of a trace file.
|
void |
initialize(IniFile ini,
int startEventID,
int startEventClass,
String startEvent,
int stopEventID,
int stopEventClass,
String stopEvent,
int rotateEventID,
int rotateEventClass,
String rotateEvent,
int errorEventID,
int errorEventClass,
String errorEvent)
Initializes the event user exit.
|
void |
logEvent(ServerEvent e)
Processes a single queued event, e.g.
|
boolean |
rotateInformation()
Rotates the event information if stored in e.g.
|
boolean |
setMaximumFileSize(long maxSize)
Sets the maximum file size of a trace file.
|
public DefaultEventExit()
public void initialize(IniFile ini, int startEventID, int startEventClass, String startEvent, int stopEventID, int stopEventClass, String stopEvent, int rotateEventID, int rotateEventClass, String rotateEvent, int errorEventID, int errorEventClass, String errorEvent) throws IOException
This function reads the file name for event logging from "server.ini". If this entry is not found, "PgmName.log" in the current directory will be used.
initialize
in interface EventInterface2
IOException
- if the file cannot be created.public void dispose()
Note that the methods in this interface can be called from different
threads, so the implementing code may have to be e.g. synchronized
.
dispose
in interface EventInterface
public void logEvent(ServerEvent e) throws IOException
Note that the methods in this interface can be called from different
threads, so the implementing code may have to be e.g. synchronized
.
logEvent
in interface EventInterface
IOException
- if e.g. the file cannot be created.public String getEventFileName()
getEventFileName
in interface EventInterface
public long getEventFileLength()
getEventFileLength
in interface EventInterface
public boolean rotateInformation()
Note that the methods in this interface can be called from different
threads, so the implementing code may have to be e.g. synchronized
.
rotateInformation
in interface EventInterface
public boolean setMaximumFileSize(long maxSize)
setMaximumFileSize
in interface EventInterface
public long getMaximumFileSize()
getMaximumFileSize
in interface EventInterface
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.