raccoon.core.uitest.file
Class FilePublisher

java.lang.Object
  extended by raccoon.core.types.AbsComponent
      extended by raccoon.core.types.AbsLoadable
          extended by raccoon.core.types.AbsConfigurableLoadable
              extended by raccoon.core.uitest.file.FilePublisher
All Implemented Interfaces:
IUnitPlayer, IBaseComponent, IConfigurable, ILoadable, ILogable

public class FilePublisher
extends AbsConfigurableLoadable
implements IUnitPlayer

The file publisher implementation of IUnitPlayer.

Since:
Raccoon v1.0
Version:
$Id: FilePublisher.java,v 1.1 2004/08/08 20:19:19 crouvrais Exp $
Author:
Cedric ROUVRAIS

Field Summary
 
Fields inherited from class raccoon.core.types.AbsConfigurableLoadable
mConfigurableManager
 
Fields inherited from class raccoon.core.types.AbsLoadable
mIsLoaded
 
Fields inherited from class raccoon.core.types.AbsComponent
mIsInError
 
Fields inherited from interface raccoon.api.eai.uitest.IUnitPlayer
PLAYER_CHANNEL, REPEAT, REPEAT_INFINITE, REPEAT_ONCE
 
Constructor Summary
FilePublisher()
           
 
Method Summary
 void addPlayerChannel(ComponentFile pRecordingChannel)
          Adds a new player channel to the list of current playing channels.
 void configureParameters()
          Configures the various parameters for this component.
 java.util.ArrayList getPlayerChannels()
          The list of channels on which the messages are being sent.
 int getRepeat()
          The number of times this unit player must repeat the specified sequence.
 void load()
          Loads or initializes the component.
 void run()
          Publishes all the sequenced messages.
 void setPlayerChannels(java.util.ArrayList pPlayerChannels)
          Sets the channels to which the events are to be sent.
 void setRepeat(int pRepeat)
          Defines the number of times this player should repeat the sequence.
 
Methods inherited from class raccoon.core.types.AbsConfigurableLoadable
isStable, setConfigurableManager, setLogger
 
Methods inherited from class raccoon.core.types.AbsLoadable
getLog, isInError, isInitialised, isRunning, unload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePublisher

public FilePublisher()
Method Detail

getRepeat

public int getRepeat()
The number of times this unit player must repeat the specified sequence.

Specified by:
getRepeat in interface IUnitPlayer
Returns:
the number of repetitions.

setRepeat

public void setRepeat(int pRepeat)
               throws RaccoonException,
                      java.lang.IllegalArgumentException
Defines the number of times this player should repeat the sequence.

Specified by:
setRepeat in interface IUnitPlayer
Parameters:
pRepeat - the number of times this player should repeat the sequence, zero for infinite.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)

setPlayerChannels

public void setPlayerChannels(java.util.ArrayList pPlayerChannels)
                       throws RaccoonException,
                              java.lang.IllegalArgumentException
Sets the channels to which the events are to be sent.

Specified by:
setPlayerChannels in interface IUnitPlayer
Parameters:
pPlayerChannels - the channels.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)

getPlayerChannels

public java.util.ArrayList getPlayerChannels()
The list of channels on which the messages are being sent.

Specified by:
getPlayerChannels in interface IUnitPlayer
Returns:
an ArrayList of ComponentFile

addPlayerChannel

public void addPlayerChannel(ComponentFile pRecordingChannel)
                      throws RaccoonException,
                             java.lang.IllegalArgumentException
Adds a new player channel to the list of current playing channels.

Specified by:
addPlayerChannel in interface IUnitPlayer
Parameters:
pRecordingChannel - the new playing channel to add.
Throws:
RaccoonException - if this component is already running: the component can't be changed. Error code is ErrorCodes.COMPONENT_INITIALISED
java.lang.IllegalArgumentException - if the parameter is null, the message is obtained via MsgHelper.formatNullParamter(java.lang.String, java.lang.Class)

run

public void run()
         throws RaccoonException
Publishes all the sequenced messages.

Specified by:
run in interface IUnitPlayer
Throws:
RaccoonException - if the publication is interrupted.

load

public void load()
          throws java.lang.IllegalStateException,
                 LoadableException
Loads or initializes the component.

Specified by:
load in interface ILoadable
Overrides:
load in class AbsConfigurableLoadable
Throws:
LoadableException - if the component couldn't load itself.
java.lang.IllegalStateException - if the component isn't in a state to load itself. for example it is already loaded.

configureParameters

public void configureParameters()
Configures the various parameters for this component. This method should configure the instance of IConfigurableManager provided during the invocation of AbsConfigurableLoadable.setConfigurableManager(IConfigurableManager).

Specified by:
configureParameters in interface IConfigurable
Overrides:
configureParameters in class AbsConfigurableLoadable


Copyright null null. All Rights Reserved.