qflib 0.98.0

de.qfs.lib.logrmi
Interface RemoteLogLevelCallback

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
RemoteLogLevelCallbackImplBase

public interface RemoteLogLevelCallback
extends java.rmi.Remote

Callback that enables remote access to the log levels of an application as well as the ouput and pre queue levels and the queue and flush buffer parameters.

Version:
$Revision: 1.2 $
Author:
Gregor Schmid
See Also:
Log

Method Summary
 void disconnect()
          End the connection with the LogLevelCallback.
 int getFlushBufferSize()
          Get the size of the flush buffer of the callback's application.
 int getFlushTriggerLevel()
          Get the level that will trigger a flush of the messages saved in the flush buffer of the callback's application.
 java.lang.Object[] getLogLevels()
          Get the current log levels from the callback.
 int getOutputLevel()
          Get the current output log level from the callback's application.
 int getPostFlushSize()
          Get the number of messages to pass unfiltered through the pre-queue stage after a flush happened in the callback's application.
 int getPreQueueLevel()
          Return the current pre-queue level from the callback's application.
 int getQueueSize()
          Get the size of log queue of the callback's application.
 boolean isDropOnOverflow()
          Check whether the callback's application is dropping entries when its log queue overflows.
 boolean isQueueing()
          Check whether the callback's application is using a log queue.
 void removeLogLevel(java.lang.String name)
          Callback method for a LogLevelListener to remove the log level for a class or package.
 void setDropOnOverflow(boolean drop)
          Set whether the callback's application should drop entries when its log queue overflows.
 void setFlushBufferSize(int size)
          Set the size of the flush buffer of the callback's application.
 void setFlushTriggerLevel(int level)
          Set the level that will trigger a flush of the messages saved in the flush buffer of the callback's application.
 void setLogLevel(java.lang.String name, int level)
          Callback method for a LogLevelListener to change the log level for a class or package.
 void setOutputLevel(int level)
          Set the output log level for the callback's application.
 void setPostFlushSize(int size)
          Set the number of messages to pass unfiltered through the pre-queue stage after a flush happened in the callback's application.
 void setPreQueueLevel(int level)
          Set the pre-queue level for the callback's application.
 void setQueueing(boolean queue)
          Set whether the callback's application should use a log queue.
 void setQueueSize(int size)
          Set the size of log queue of the callback's application.
 

Method Detail

getLogLevels

public java.lang.Object[] getLogLevels()
                                throws java.rmi.RemoteException
Get the current log levels from the callback. This method is needed to synchronize the LogLevelListener and the LogLevelCallback after the connection has been established.
Returns:
An object array that contains an alternating sequence of class/package names and log levels. The levels are Integers that may be null for classes for which a level has been requested but not explicitly set.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

setLogLevel

public void setLogLevel(java.lang.String name,
                        int level)
                 throws java.rmi.RemoteException
Callback method for a LogLevelListener to change the log level for a class or package.
Parameters:
name - The name of the affected class or package.
level - The new log level.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

removeLogLevel

public void removeLogLevel(java.lang.String name)
                    throws java.rmi.RemoteException
Callback method for a LogLevelListener to remove the log level for a class or package.
Parameters:
name - The name of the affected class or package.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

getOutputLevel

public int getOutputLevel()
                   throws java.rmi.RemoteException
Get the current output log level from the callback's application.
Returns:
The current output log level.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.getOutputLevel()

setOutputLevel

public void setOutputLevel(int level)
                    throws java.rmi.RemoteException
Set the output log level for the callback's application.
Parameters:
level - Output log level to set.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setOutputLevel(int)

getPreQueueLevel

public int getPreQueueLevel()
                     throws java.rmi.RemoteException
Return the current pre-queue level from the callback's application.
Returns:
The current pre-queue level.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.getPreQueueLevel()

setPreQueueLevel

public void setPreQueueLevel(int level)
                      throws java.rmi.RemoteException
Set the pre-queue level for the callback's application.
Parameters:
level - The pre-queue level to set.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setPreQueueLevel(int)

isQueueing

public boolean isQueueing()
                   throws java.rmi.RemoteException
Check whether the callback's application is using a log queue.
Returns:
Whether the callback's application is queueing log entries.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.isQueueing()

setQueueing

public void setQueueing(boolean queue)
                 throws java.rmi.RemoteException
Set whether the callback's application should use a log queue.
Parameters:
queue - Whether to queue log entries.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setQueueing(boolean)

getQueueSize

public int getQueueSize()
                 throws java.rmi.RemoteException
Get the size of log queue of the callback's application.
Returns:
The size of the log queue.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.getQueueSize()

setQueueSize

public void setQueueSize(int size)
                  throws java.rmi.RemoteException
Set the size of log queue of the callback's application.
Parameters:
size - The size of the log queue.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setQueueSize(int)

isDropOnOverflow

public boolean isDropOnOverflow()
                         throws java.rmi.RemoteException
Check whether the callback's application is dropping entries when its log queue overflows.
Returns:
Whether entries are dropped on overflow.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.isDropOnOverflow()

setDropOnOverflow

public void setDropOnOverflow(boolean drop)
                       throws java.rmi.RemoteException
Set whether the callback's application should drop entries when its log queue overflows.
Parameters:
drop - Whether to drop entries on overflow.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setDropOnOverflow(boolean)

getFlushBufferSize

public int getFlushBufferSize()
                       throws java.rmi.RemoteException
Get the size of the flush buffer of the callback's application.
Returns:
The flush buffer size or 0 to indicate no flush buffer.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.getFlushBufferSize()

setFlushBufferSize

public void setFlushBufferSize(int size)
                        throws java.rmi.RemoteException
Set the size of the flush buffer of the callback's application. Setting it to 0 will turn the flush buffer off.
Parameters:
size - The size of the flush buffer.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setFlushBufferSize(int)

getFlushTriggerLevel

public int getFlushTriggerLevel()
                         throws java.rmi.RemoteException
Get the level that will trigger a flush of the messages saved in the flush buffer of the callback's application.
Returns:
The flush buffer's trigger level.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.getFlushTriggerLevel()

setFlushTriggerLevel

public void setFlushTriggerLevel(int level)
                          throws java.rmi.RemoteException
Set the level that will trigger a flush of the messages saved in the flush buffer of the callback's application.
Parameters:
level - The trigger level to set.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setFlushTriggerLevel(int)

getPostFlushSize

public int getPostFlushSize()
                     throws java.rmi.RemoteException
Get the number of messages to pass unfiltered through the pre-queue stage after a flush happened in the callback's application.
Returns:
The number of messages to pass.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.getPostFlushSize()

setPostFlushSize

public void setPostFlushSize(int size)
                      throws java.rmi.RemoteException
Set the number of messages to pass unfiltered through the pre-queue stage after a flush happened in the callback's application.
Parameters:
size - The number of messages to pass.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setPostFlushSize(int)

disconnect

public void disconnect()
                throws java.rmi.RemoteException
End the connection with the LogLevelCallback.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

qflib 0.98.0