qflib 0.98.1

de.qfs.lib.logrmi
Class RemoteLogLevelCallbackImplBase

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--de.qfs.lib.logrmi.RemoteLogLevelCallbackImplBase
All Implemented Interfaces:
java.rmi.Remote, RemoteLogLevelCallback, java.io.Serializable
Direct Known Subclasses:
RemoteLogLevelAdapter

public abstract class RemoteLogLevelCallbackImplBase
extends java.rmi.server.UnicastRemoteObject
implements RemoteLogLevelCallback

If a class wants to implement the RemoteLogLevelCallback interface it should do so by extending this abstract class instead of UnicastRemoteObject. That way it doesn't have to care about the RMI stubs, since they are part of the de.qfs.lib.logrmi package. Otherwise it will have to make the stubs available itself.

Version:
$Revision: 1.2 $
Author:
Gregor Schmid
See Also:
Serialized Form

Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteLogLevelCallbackImplBase()
          Create a new RemoteLogLevelCallbackImplBase.
 
Method Summary
abstract  void disconnect()
          End the connection with the RemoteLogLevelCallback.
abstract  int getFlushBufferSize()
          Get the size of the flush buffer of the callback's application.
abstract  int getFlushTriggerLevel()
          Get the level that will trigger a flush of the messages saved in the flush buffer of the callback's application.
abstract  java.lang.Object[] getLogLevels()
          Get the current log levels from the callback.
abstract  int getOutputLevel()
          Get the current output log level from the callback's application.
abstract  int getPostFlushSize()
          Get the number of messages to pass unfiltered through the pre-queue stage after a flush happened in the callback's application.
abstract  int getPreQueueLevel()
          Return the current pre-queue level from the callback's application.
abstract  int getQueueSize()
          Get the size of log queue of the callback's application.
abstract  boolean isDropOnOverflow()
          Check whether the callback's application is dropping entries when its log queue overflows.
abstract  boolean isQueueing()
          Check whether the callback's application is using a log queue.
abstract  void removeLogLevel(java.lang.String name)
          Callback method for a LogLevelListener to remove the log level for a class or package.
abstract  void setDropOnOverflow(boolean drop)
          Set whether the callback's application should drop entries when its log queue overflows.
abstract  void setFlushBufferSize(int size)
          Set the size of the flush buffer of the callback's application.
abstract  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.
abstract  void setLogLevel(java.lang.String name, int level)
          Callback method for a LogLevelListener to change the log level for a class or package.
abstract  void setOutputLevel(int level)
          Set the output log level for the callback's application.
abstract  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.
abstract  void setPreQueueLevel(int level)
          Set the pre-queue level for the callback's application.
abstract  void setQueueing(boolean queue)
          Set whether the callback's application should use a log queue.
abstract  void setQueueSize(int size)
          Set the size of log queue of the callback's application.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteLogLevelCallbackImplBase

public RemoteLogLevelCallbackImplBase()
                               throws java.rmi.RemoteException
Create a new RemoteLogLevelCallbackImplBase.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
Method Detail

getLogLevels

public abstract 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 RemoteLogLevelCallback after the connection has been established.
Specified by:
getLogLevels in interface RemoteLogLevelCallback
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 abstract 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.
Specified by:
setLogLevel in interface RemoteLogLevelCallback
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 abstract 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.
Specified by:
removeLogLevel in interface RemoteLogLevelCallback
Parameters:
name - The name of the affected class or package.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

getOutputLevel

public abstract int getOutputLevel()
                            throws java.rmi.RemoteException
Get the current output log level from the callback's application.
Specified by:
getOutputLevel in interface RemoteLogLevelCallback
Returns:
The current output log level.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

setOutputLevel

public abstract void setOutputLevel(int level)
                             throws java.rmi.RemoteException
Set the output log level for the callback's application.
Specified by:
setOutputLevel in interface RemoteLogLevelCallback
Parameters:
level - Output log level to set.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

getPreQueueLevel

public abstract int getPreQueueLevel()
                              throws java.rmi.RemoteException
Return the current pre-queue level from the callback's application.
Specified by:
getPreQueueLevel in interface RemoteLogLevelCallback
Returns:
The current pre-queue level.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

setPreQueueLevel

public abstract void setPreQueueLevel(int level)
                               throws java.rmi.RemoteException
Set the pre-queue level for the callback's application.
Specified by:
setPreQueueLevel in interface RemoteLogLevelCallback
Parameters:
level - The pre-queue level to set.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

isQueueing

public abstract boolean isQueueing()
                            throws java.rmi.RemoteException
Check whether the callback's application is using a log queue.
Specified by:
isQueueing in interface RemoteLogLevelCallback
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 abstract void setQueueing(boolean queue)
                          throws java.rmi.RemoteException
Set whether the callback's application should use a log queue.
Specified by:
setQueueing in interface RemoteLogLevelCallback
Parameters:
queue - Whether to queue log entries.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.setQueueing(boolean)

getQueueSize

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

setQueueSize

public abstract void setQueueSize(int size)
                           throws java.rmi.RemoteException
Set the size of log queue of the callback's application.
Specified by:
setQueueSize in interface RemoteLogLevelCallback
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 abstract boolean isDropOnOverflow()
                                  throws java.rmi.RemoteException
Check whether the callback's application is dropping entries when its log queue overflows.
Specified by:
isDropOnOverflow in interface RemoteLogLevelCallback
Returns:
Whether entries are dropped on overflow.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.
See Also:
Log.isDropOnOverflow()

setDropOnOverflow

public abstract void setDropOnOverflow(boolean drop)
                                throws java.rmi.RemoteException
Set whether the callback's application should drop entries when its log queue overflows.
Specified by:
setDropOnOverflow in interface RemoteLogLevelCallback
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 abstract int getFlushBufferSize()
                                throws java.rmi.RemoteException
Get the size of the flush buffer of the callback's application.
Specified by:
getFlushBufferSize in interface RemoteLogLevelCallback
Returns:
The flush buffer size or 0 to indicate no flush buffer.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

setFlushBufferSize

public abstract 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.
Specified by:
setFlushBufferSize in interface RemoteLogLevelCallback
Parameters:
size - The size of the flush buffer.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

getFlushTriggerLevel

public abstract 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.
Specified by:
getFlushTriggerLevel in interface RemoteLogLevelCallback
Returns:
The flush buffer's trigger level.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

setFlushTriggerLevel

public abstract 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.
Specified by:
setFlushTriggerLevel in interface RemoteLogLevelCallback
Parameters:
level - The trigger level to set.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

getPostFlushSize

public abstract 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.
Specified by:
getPostFlushSize in interface RemoteLogLevelCallback
Returns:
The number of messages to pass.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

setPostFlushSize

public abstract 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.
Specified by:
setPostFlushSize in interface RemoteLogLevelCallback
Parameters:
size - The number of messages to pass.
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

disconnect

public abstract void disconnect()
                         throws java.rmi.RemoteException
End the connection with the RemoteLogLevelCallback.
Specified by:
disconnect in interface RemoteLogLevelCallback
Throws:
java.rmi.RemoteException - If something RMI specific goes wrong.

qflib 0.98.1