com.rbnb.plugins
Class PlugInRecorder

java.lang.Object
  extended by com.rbnb.plugins.PlugInRecorder

public class PlugInRecorder
extends Object

Makes requests of a plug-in at a fixed interval. Records the results in a channel on the server. The requests are spaced so as to be gap free, without overlap.


Constructor Summary
PlugInRecorder()
           
PlugInRecorder(String in, String out)
          A convenience constructor which sets the input and output channels.
 
Method Summary
 int getArchiveSize()
          Returns the length of the archive to use for recording.
 String getHost()
          The RBNB hostname:port.
 String getInputChannel()
          Returns the channel to record.
 int getInterval()
          Returns the interval between requests, in milliseconds.
 String getOutputChannel()
          Get the recording destination channel.
 String getPassword()
          Password used in connecting to the RBNB.
 Throwable getRecorderException()
          If the recording thread stops because of an exception, it can be retrieved using this method.
 String getRequestStart()
          Returns the starting point for recording.
 String getUser()
          Username used in connecting to the RBNB.
 boolean isRunning()
          Returns true if the recorder is running.
 void setArchiveSize(int archiveSize)
          Set the length of the archive to use for recording.
 void setHost(String host)
           
 void setInputChannel(String inputChannel)
          Set the channel to record.
 void setInterval(int interval_ms)
          Set the interval between requests, in milliseconds.
 void setOutputChannel(String outputChannel)
          Set the destination of recording.
 void setPassword(String pass)
           
 void setRequestStart(String requestStart)
          Sets the start of the recording.
 void setUser(String user)
           
 void start()
          Begins recording.
 void stop()
          Ends recording.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlugInRecorder

public PlugInRecorder()

PlugInRecorder

public PlugInRecorder(String in,
                      String out)
A convenience constructor which sets the input and output channels.

See Also:
setInputChannel(String), setOutputChannel(String)
Method Detail

getArchiveSize

public int getArchiveSize()
Returns the length of the archive to use for recording.


setArchiveSize

public void setArchiveSize(int archiveSize)
Set the length of the archive to use for recording. Note the archive is always in "append" mode. The default is 100,000 frames.


getHost

public final String getHost()
The RBNB hostname:port. The default is "localhost:3333".


setHost

public final void setHost(String host)

getUser

public final String getUser()
Username used in connecting to the RBNB. Default is null.


setUser

public final void setUser(String user)

getPassword

public final String getPassword()
Password used in connecting to the RBNB. Default is null.


setPassword

public final void setPassword(String pass)

getInterval

public int getInterval()
Returns the interval between requests, in milliseconds. This also becomes the minimum duration.


setInterval

public void setInterval(int interval_ms)
Set the interval between requests, in milliseconds. The default is 10000 ms.


getInputChannel

public String getInputChannel()
Returns the channel to record.


setInputChannel

public final void setInputChannel(String inputChannel)
Set the channel to record.


getOutputChannel

public String getOutputChannel()
Get the recording destination channel.


setOutputChannel

public final void setOutputChannel(String outputChannel)
Set the destination of recording. It should be of the form:

source/folder_1/folder_2/.../folder_n/file

where the folders are optional.

Throws:
IllegalArgumentException - If the channel is not the correct form.

getRequestStart

public String getRequestStart()
Returns the starting point for recording. One of "newest" or "oldest".


setRequestStart

public void setRequestStart(String requestStart)
Sets the start of the recording. One of:

The default is newest.


isRunning

public final boolean isRunning()
Returns true if the recorder is running.


getRecorderException

public Throwable getRecorderException()
If the recording thread stops because of an exception, it can be retrieved using this method. Otherwise returns null.


start

public void start()
Begins recording.


stop

public void stop()
Ends recording.