|
xmlBlaster 1.5.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.recorder.ram.RamRecorder
You can use this recorder to remember all invocations of the xmlBlaster CORBA methods.
It is based on a queue (FIFO). Every method invocation is timestamped and wrapped into an InvocationContainer object, and pushed into the queue. Configuration:RecorderPlugin[RamRecorder][1.0]=org.xmlBlaster.util.recorder.ram.RamRecorder
org.xmlBlaster.test.qos.TestFailSave
,
InvocationRecorderTest
Nested Class Summary | |
private class |
RamRecorder.InvocationContainer
This holds all the necessary info about one method invocation. |
Field Summary | |
private EraseReturnQos[] |
dummyEraseReturnQosArr
|
private MsgUnit[] |
dummyMArr
|
private PublishReturnQos |
dummyPubRet
|
private PublishReturnQos[] |
dummyPubRetQosArr
|
private SubscribeReturnQos |
dummySubRet
|
private UnSubscribeReturnQos[] |
dummyUbSubRetQosArr
|
private Global |
glob
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
private SimpleXbQueue |
queue
The queue to hold the method invocations TODO: Allow persistence store e.g. |
private I_XmlBlaster |
serverCallback
Callback which the client must implement. |
Constructor Summary | |
RamRecorder()
Empty constructor for plugin manager |
Method Summary | |
private void |
callback(RamRecorder.InvocationContainer cont)
Call back the client through the interfaces |
void |
destroy()
Reset the queue, throw all entries to garbage |
EraseReturnQos[] |
erase(java.lang.String xmlKey_literal,
java.lang.String qos_literal)
|
MsgUnit[] |
get(java.lang.String xmlKey_literal,
java.lang.String qos_literal)
|
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 recorder. |
java.lang.String |
getType()
Return plugin type for Plugin loader |
java.lang.String |
getVersion()
Return plugin version for Plugin loader |
void |
init(Global glob,
PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin). |
void |
initialize(Global glob,
java.lang.String fn,
long maxEntries,
I_XmlBlaster serverCallback)
Called by plugin manager. |
boolean |
isFull()
Check if the recorder is filled up. |
boolean |
ping()
For I_XmlBlaster interface |
void |
playback(long startDate,
long endDate,
double motionFactor)
Playback the stored messages, without removing them form the recorder. |
PublishReturnQos |
publish(MsgUnit msgUnit)
|
PublishReturnQos[] |
publishArr(MsgUnit[] msgUnitArr)
|
void |
publishOneway(MsgUnit[] msgUnitArr)
|
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()
Cleans up the resource. |
SubscribeReturnQos |
subscribe(java.lang.String xmlKey_literal,
java.lang.String qos_literal)
|
UnSubscribeReturnQos[] |
unSubscribe(java.lang.String xmlKey_literal,
java.lang.String qos_literal)
For I_XmlBlaster interface |
java.lang.String[] |
update(java.lang.String cbSessionId,
MsgUnit[] msgUnitArr)
This is the callback method invoked from xmlBlaster delivering us a new asynchronous message. |
void |
updateOneway(java.lang.String cbSessionId,
MsgUnit[] msgUnitArr)
This is the callback method invoked from xmlBlaster delivering us a new asynchronous message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.String ME
private Global glob
private static java.util.logging.Logger log
private SimpleXbQueue queue
private I_XmlBlaster serverCallback
private final MsgUnit[] dummyMArr
private final PublishReturnQos[] dummyPubRetQosArr
private PublishReturnQos dummyPubRet
private SubscribeReturnQos dummySubRet
private final UnSubscribeReturnQos[] dummyUbSubRetQosArr
private final EraseReturnQos[] dummyEraseReturnQosArr
Constructor Detail |
public RamRecorder()
Method Detail |
public void initialize(Global glob, java.lang.String fn, long maxEntries, I_XmlBlaster serverCallback)
I_InvocationRecorder
initialize
in interface I_InvocationRecorder
maxEntries
- The maximum number of invocations to storefn
- The file name (without path information!) for persistence or null (will be generated or ignored if RAM based)serverCallback
- You need to implement I_XmlBlaster to receive the invocations on playback
null if you are not interested in thoseI_InvocationRecorder.initialize(org.xmlBlaster.util.Global, java.lang.String, long, org.xmlBlaster.client.protocol.I_XmlBlaster)
public java.lang.String getFullFileName()
getFullFileName
in interface I_InvocationRecorder
public void init(Global glob, PluginInfo pluginInfo)
init
in interface I_Plugin
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)
public java.lang.String getType()
getType
in interface I_Plugin
public java.lang.String getVersion()
getVersion
in interface I_Plugin
public void setMode(java.lang.String mode)
setMode
in interface I_InvocationRecorder
public final boolean isFull() throws XmlBlasterException
isFull
in interface I_InvocationRecorder
XmlBlasterException
public final long getNumUnread()
getNumUnread
in interface I_InvocationRecorder
public void pullback(long startDate, long endDate, double motionFactor) throws XmlBlasterException
pullback
in interface I_InvocationRecorder
startDate
- Start date for playback, 0 means from the very startendDate
- End date to stop playback, pass 0 to go to the very endmotionFactor
- for fast motion choose for example 4.0
so four reals seconds are elapsing in one second.XmlBlasterException
I_InvocationRecorder.playback(long, long, double)
public void pullback(float msgPerSec) throws XmlBlasterException
pullback
in interface I_InvocationRecorder
msgPerSec
- 20. is 20 msg/sec, 0.1 is one message every 10 seconds
XmlBlasterException
public void destroy()
destroy
in interface I_InvocationRecorder
public void shutdown()
I_Plugin
shutdown
in interface I_Plugin
public long getNumLost()
getNumLost
in interface I_InvocationRecorder
public void playback(long startDate, long endDate, double motionFactor) throws XmlBlasterException
playback
in interface I_InvocationRecorder
startDate
- Start date for playback, 0 means from the very startendDate
- End date to stop playback, pass 0 to go to the very endmotionFactor
- for fast motion choose for example 4.0
so four reals seconds are elapsing in one second.XmlBlasterException
I_InvocationRecorder.playback(long, long, double)
private void callback(RamRecorder.InvocationContainer cont) throws XmlBlasterException
XmlBlasterException
public SubscribeReturnQos subscribe(java.lang.String xmlKey_literal, java.lang.String qos_literal) throws XmlBlasterException
subscribe
in interface I_XmlBlaster
XmlBlasterException
- if queue is full with id="public UnSubscribeReturnQos[] unSubscribe(java.lang.String xmlKey_literal, java.lang.String qos_literal) throws XmlBlasterException
unSubscribe
in interface I_XmlBlaster
XmlBlasterException
- if queue is fullpublic PublishReturnQos publish(MsgUnit msgUnit) throws XmlBlasterException
publish
in interface I_XmlBlaster
XmlBlasterException
- if queue is fullpublic void publishOneway(MsgUnit[] msgUnitArr)
publishOneway
in interface I_XmlBlaster
public PublishReturnQos[] publishArr(MsgUnit[] msgUnitArr) throws XmlBlasterException
publishArr
in interface I_XmlBlaster
XmlBlasterException
- if queue is fullpublic EraseReturnQos[] erase(java.lang.String xmlKey_literal, java.lang.String qos_literal) throws XmlBlasterException
erase
in interface I_XmlBlaster
XmlBlasterException
- if queue is fullpublic MsgUnit[] get(java.lang.String xmlKey_literal, java.lang.String qos_literal) throws XmlBlasterException
get
in interface I_XmlBlaster
XmlBlasterException
- if queue is fullpublic boolean ping()
public java.lang.String[] update(java.lang.String cbSessionId, MsgUnit[] msgUnitArr) throws XmlBlasterException
XmlBlasterException
I_Callback.update(String, UpdateKey, byte[], UpdateQos)
public void updateOneway(java.lang.String cbSessionId, MsgUnit[] msgUnitArr)
I_Callback.update(String, UpdateKey, byte[], UpdateQos)
|
xmlBlaster 1.5.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |