org.robokind.api.messaging
Interface RemoteService<T>

Type Parameters:
T - type of configuration used to initialize the Service.
All Superinterfaces:
org.robokind.api.common.playable.Playable

public interface RemoteService<T>
extends org.robokind.api.common.playable.Playable

RemoteService is an interface for controlling a Service through Messaging. RemoteService extends Playable, offering methods to start, pause, resume, and stop the service.

Author:
Matthew Stevenson

Method Summary
 Class<T> getConfigClass()
          Returns the class of the config used to initialize.
 T getReusableConfig()
          Returns an empty config which is used during initialization.
 void initialize(T config)
          Initializes the Service with the given config.
 
Methods inherited from interface org.robokind.api.common.playable.Playable
addPlayableListener, complete, getElapsedPauseTime, getElapsedPlayTime, getPauseTime, getPlayState, getResumeTime, getStartTime, getStopTime, pause, removePlayableListener, resume, start, stop
 

Method Detail

initialize

void initialize(T config)
                throws Exception
Initializes the Service with the given config.

Parameters:
config - the configuration object used to initialize the Service
Throws:
Exception - if there is an error initializing

getConfigClass

Class<T> getConfigClass()
Returns the class of the config used to initialize.

Returns:
class of the config used to initialize

getReusableConfig

T getReusableConfig()
Returns an empty config which is used during initialization.

Returns:
empty config which is used during initialization


Copyright © 2011. All Rights Reserved.