Java EE 5 SDK

com.sun.appserv.management.helper
Class StatefulLoggingHelper

java.lang.Object
  extended by com.sun.appserv.management.helper.Helper
      extended by com.sun.appserv.management.helper.StatefulLoggingHelper

public final class StatefulLoggingHelper
extends Helper

Helper class for simplifying querying the log files. Unlike LoggingHelper, state is maintained from call-to-call, which may be helpful in performing repeated queries.

Some combinations of parameters may not be useful; it is up to the caller to ensure reasonable parameters.

A typical use for this helper would be periodic queries for new log records and/or retrieving log records in batches.

Since:
AppServer 9.0
See Also:
LoggingHelper

Field Summary
 
Fields inherited from class com.sun.appserv.management.helper.Helper
mBulkAccess, mDomainRoot, mQueryMgr
 
Constructor Summary
StatefulLoggingHelper(Logging logging)
          Create with default parameters.
 
Method Summary
 List<Attribute> getAttrs()
           
 String getLogFile()
           
 Logging getLogging()
           
 String getLogLevel()
           
 int getMaxRecords()
           
 Set<String> getModules()
           
 boolean getSearchForward()
           
 long getStartIndex()
           
 long getStartTime()
           
 long getStopTime()
           
 LogQueryResult query()
          Query for LogRecords based upon the current settings.
 void setAttrs(List<Attribute> attrs)
           
 void setLogFile(String name)
          If the specified log file is different, the startIndex is reset appropriately.
 void setLogLevel(String logLevel)
           
 void setMaxRecords(int maxRecords)
           
 void setModule(String module)
           
 void setModules(Set<String> modules)
           
 void setSearchForward(boolean searchForward)
           
 void setStartIndex(int startIndex)
           
 void setStartTime(Long startTime)
           
 void setStopTime(Long stopTime)
           
 
Methods inherited from class com.sun.appserv.management.helper.Helper
filterByAttributeValue, getDomainRoot, propsQuery, propsQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatefulLoggingHelper

public StatefulLoggingHelper(Logging logging)
Create with default parameters.

Method Detail

getLogging

public Logging getLogging()

getLogFile

public String getLogFile()

getStartIndex

public long getStartIndex()

getModules

public Set<String> getModules()

getAttrs

public List<Attribute> getAttrs()

getSearchForward

public boolean getSearchForward()

getStartTime

public long getStartTime()

getStopTime

public long getStopTime()

getLogLevel

public String getLogLevel()

getMaxRecords

public int getMaxRecords()

setLogFile

public void setLogFile(String name)
If the specified log file is different, the startIndex is reset appropriately.


setStartIndex

public void setStartIndex(int startIndex)

setLogLevel

public void setLogLevel(String logLevel)

setMaxRecords

public void setMaxRecords(int maxRecords)

setModules

public void setModules(Set<String> modules)

setModule

public void setModule(String module)

setAttrs

public void setAttrs(List<Attribute> attrs)

setSearchForward

public void setSearchForward(boolean searchForward)

setStartTime

public void setStartTime(Long startTime)

setStopTime

public void setStopTime(Long stopTime)

query

public LogQueryResult query()
Query for LogRecords based upon the current settings. The startIndex is updated appropriately following the query, depending on the search direction. A subsequent query will begin at the next available index.


Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.