|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.idm.util.progress.ProgressLogger
public class ProgressLogger
This is a convenience class that can be extended by other classes that need to implement the progress listener interface. This implementation maintains a log of progress events and state changes in memory, and optionally logs events to a stream or writer.
ProgressListener
, ProgressEvent
Field Summary | |
---|---|
protected int |
eventLimit |
protected java.util.LinkedList |
events |
protected XmlPrintWriter |
log |
protected int |
stateLimit |
protected java.util.LinkedList |
states |
protected java.lang.String |
tag Tag used to print the progress logger as an XML element. |
Constructor Summary | |
---|---|
ProgressLogger() Creates a progress logger. |
|
ProgressLogger(java.io.File file) Creates a progress logger. |
|
ProgressLogger(java.io.File file, boolean append) Creates a progress logger. |
|
ProgressLogger(java.io.OutputStream log) Creates a progress logger. |
|
ProgressLogger(java.lang.String filename) Creates a progress logger. |
|
ProgressLogger(java.lang.String filename, boolean append) Creates a progress logger. |
|
ProgressLogger(java.io.Writer log) Creates a progress logger. |
Method Summary | |
---|---|
int |
getEventLimit() Getter for the eventLimit property. |
java.util.LinkedList |
getEvents() Getter for the events property. |
int |
getStateLimit() Getter for the stateLimit property. |
java.util.LinkedList |
getStates() Getter for the states property. |
protected void |
logEvent(ProgressEvent event) Logger for events. |
protected void |
logState(StateInfo state) Logger for states. |
void |
receiveProgressEvent(ProgressEvent event) This implementation of receiveProgressEvent method log the progress event and state change in memory. |
void |
reset() Reset the event and state change log by clearing all entries. |
void |
setEventLimit(int limit) Setter for the eventLimit property. |
void |
setStateLimit(int limit) Setter for the stateLimit property. |
protected void |
trimEvents() Trimmer for events. |
protected void |
trimStates() Trimmer for states. |
void |
xprint(XmlPrintWriter out) Prints progress logger properties to the PrintWriter as an XML element. |
protected void |
xprintBody(XmlPrintWriter out) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected XmlPrintWriter log
protected int eventLimit
protected java.util.LinkedList events
protected int stateLimit
protected java.util.LinkedList states
protected java.lang.String tag
Constructor Detail |
---|
public ProgressLogger()
public ProgressLogger(java.lang.String filename) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public ProgressLogger(java.lang.String filename, boolean append) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public ProgressLogger(java.io.File file) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public ProgressLogger(java.io.File file, boolean append) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public ProgressLogger(java.io.OutputStream log)
public ProgressLogger(java.io.Writer log)
Method Detail |
---|
public void reset()
public int getEventLimit()
public void setEventLimit(int limit)
int
- representing the event limitpublic java.util.LinkedList getEvents()
protected void trimEvents()
protected void logEvent(ProgressEvent event)
ProgressEvent
-public int getStateLimit()
public void setStateLimit(int limit)
int
- representing the state limitpublic java.util.LinkedList getStates()
protected void trimStates()
protected void logState(StateInfo state)
StateInfo
-public void receiveProgressEvent(ProgressEvent event)
receiveProgressEvent
in interface ProgressListener
event
-public void xprint(XmlPrintWriter out)
xprint
in interface XmlPrintable
out
- PrintWriter for printing progress logger propeties.protected void xprintBody(XmlPrintWriter out)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |