xmlBlaster 1.5.1 API

org.xmlBlaster.util.recorder
Interface I_InvocationRecorder

All Superinterfaces:
I_XmlBlaster
All Known Implementing Classes:
FileRecorder, RamRecorder

public interface I_InvocationRecorder
extends I_XmlBlaster

Interface for InvocationRecorder, forces the supported methods.

See Also:
RamRecorder, FileRecorder

Method Summary
 void destroy()
          Reset the queue, throw all entries to garbage.
 java.lang.String getFullFileName()
          Returns the name of the database file or null if RAM based
 long getNumLost()
          How many messages are silently lost in 'discard' or 'discardOldest' mode?
 long getNumUnread()
          How many objects are in the queue.
 void initialize(Global glob, java.lang.String fn, long maxEntries, I_XmlBlaster serverCallback)
          Called by plugin manager.
 boolean isFull()
           
 void playback(long startDate, long endDate, double motionFactor)
          Playback the stored messages, without removing them form the recorder.
 void pullback(float msgPerSec)
          Playback the stored messages, the are removed from the recorder after the callback.
 void pullback(long startDate, long endDate, double motionFactor)
          Playback the stored messages, the are removed from the recorder after the callback.
 void setMode(java.lang.String mode)
           
 void shutdown()
          Close the queue, entries are still available (e.g.
 
Methods inherited from interface org.xmlBlaster.client.protocol.I_XmlBlaster
erase, get, publish, publishArr, publishOneway, subscribe, unSubscribe
 

Method Detail

initialize

public void initialize(Global glob,
                       java.lang.String fn,
                       long maxEntries,
                       I_XmlBlaster serverCallback)
                throws XmlBlasterException
Called by plugin manager.

Parameters:
fn - The file name (without path information!) for persistence or null (will be generated or ignored if RAM based)
maxEntries - The maximum number of invocations to store
serverCallback - You need to implement I_XmlBlaster to receive the invocations on playback null if you are not interested in those
Throws:
XmlBlasterException

setMode

public void setMode(java.lang.String mode)

isFull

public boolean isFull()
               throws XmlBlasterException
Returns:
true of queue overflow
Throws:
XmlBlasterException

getNumUnread

public long getNumUnread()
How many objects are in the queue.

Returns:
The number of objects in this queue.

getNumLost

public long getNumLost()
How many messages are silently lost in 'discard' or 'discardOldest' mode?


getFullFileName

public java.lang.String getFullFileName()
Returns the name of the database file or null if RAM based


playback

public void playback(long startDate,
                     long endDate,
                     double motionFactor)
              throws XmlBlasterException
Playback the stored messages, without removing them form the recorder.

This you can use multiple times again.

Parameters:
startDate - Start date for playback, 0 means from the very start
endDate - End date to stop playback, pass 0 to go to the very end
motionFactor - for fast motion choose for example 4.0 so four reals seconds are elapsing in one second.
For slow motion choose for example 0.5
Throws:
XmlBlasterException

pullback

public void pullback(long startDate,
                     long endDate,
                     double motionFactor)
              throws XmlBlasterException
Playback the stored messages, the are removed from the recorder after the callback.

Every message is chronologically sent through the interface to the client.

Parameters:
startDate - Start date for playback, 0 means from the very start
endDate - End date to stop playback, pass 0 to go to the very end
motionFactor - for fast motion choose for example 4.0 so four reals seconds are elapsing in one second.
For slow motion choose for example 0.5 0. does everything instantly.
Throws:
XmlBlasterException

pullback

public void pullback(float msgPerSec)
              throws XmlBlasterException
Playback the stored messages, the are removed from the recorder after the callback.

The messages are retrieved with the given rate per second

Parameters:
msgPerSec - 20. is 20 msg/sec, 0.1 is one message every 10 seconds
Throws:
XmlBlasterException

destroy

public void destroy()
Reset the queue, throw all entries to garbage.


shutdown

public void shutdown()
Close the queue, entries are still available (e.g. close the file handle).


xmlBlaster 1.5.1 API

Copyright © 1999-2007 The xmlBlaster.org contributers.