org.robokind.api.messaging.services
Interface RemoteServiceClient<Config>

Type Parameters:
Config - type of configuration used to initialize the Service.
All Superinterfaces:
org.robokind.api.common.playable.Playable
All Known Implementing Classes:
DefaultServiceClient

public interface RemoteServiceClient<Config>
extends org.robokind.api.common.playable.Playable

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

Author:
Matthew Stevenson

Method Summary
 String getClientId()
           
 String getHostId()
           
 void initialize(Config config)
          Initializes the Service with the given config.
 void setCommandFactory(ServiceCommandFactory factory)
           
 void setCommandSender(MessageSender<ServiceCommand> sender)
           
 void setConfigSender(MessageSender<Config> sender)
           
 void setErrorReceiver(MessageAsyncReceiver<ServiceError> receiver)
           
 
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(Config 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

setCommandSender

void setCommandSender(MessageSender<ServiceCommand> sender)

setConfigSender

void setConfigSender(MessageSender<Config> sender)

setErrorReceiver

void setErrorReceiver(MessageAsyncReceiver<ServiceError> receiver)

setCommandFactory

void setCommandFactory(ServiceCommandFactory factory)

getClientId

String getClientId()

getHostId

String getHostId()


Copyright © 2011-2013. All Rights Reserved.