org.marketcetera.saclient
Interface SAService

All Superinterfaces:
ServiceBase, StatelessServiceBase

public interface SAService
extends ServiceBase

The web service interface to the remote services available from a strategy agent.

This interface is not meant to be used by the clients of this package.

Since:
2.0.0
Version:
$Id: SAService.java 16154 2012-07-14 16:34:05Z colin $
Author:
anshul@marketcetera.com

Method Summary
 ModuleURN createStrategy(ClientContext inCtx, CreateStrategyParameters inParameters)
          Creates a strategy.
 void delete(ClientContext inCtx, ModuleURN inURN)
          Deletes the module with the specified URN.
 List<ModuleURN> getInstances(ClientContext inCtx, ModuleURN inProviderURN)
          Returns the list of module instances available at the strategy agent.
 ModuleInfo getModuleInfo(ClientContext inCtx, ModuleURN inURN)
          Gets the module info for the module with the specified URN.
 MapWrapper<String,Object> getProperties(ClientContext inCtx, ModuleURN inURN)
          Fetches the (MXBean) properties of the module with the specified URN.
 List<ModuleURN> getProviders(ClientContext inCtx)
          Returns the list of providers available at the strategy agent.
 CreateStrategyParameters getStrategyCreateParms(ClientContext inServiceContext, ModuleURN inURN)
          Returns the parameters used to create a strategy.
 void sendData(ClientContext inServiceContext, Object inData)
          Sends the given data to the strategy agent.
 MapWrapper<String,Object> setProperties(ClientContext inCtx, ModuleURN inURN, MapWrapper<String,Object> inProperties)
          Sets the properties of the module with the specified URN.
 void start(ClientContext inCtx, ModuleURN inURN)
          Starts the module with the specified URN.
 void stop(ClientContext inCtx, ModuleURN inURN)
          Stops the module with the specified URN.
 

Method Detail

getProviders

List<ModuleURN> getProviders(ClientContext inCtx)
                             throws RemoteException
Returns the list of providers available at the strategy agent.

Parameters:
inCtx - the context
Returns:
the list of providers.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

getInstances

List<ModuleURN> getInstances(ClientContext inCtx,
                             ModuleURN inProviderURN)
                             throws RemoteException
Returns the list of module instances available at the strategy agent.

Parameters:
inCtx - the context
inProviderURN - the provider URN. If provided, only the instances from the specified provider are returned. If null, all the available instances are returned.
Returns:
the list of module instances.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

getModuleInfo

ModuleInfo getModuleInfo(ClientContext inCtx,
                         ModuleURN inURN)
                         throws RemoteException
Gets the module info for the module with the specified URN.

Parameters:
inCtx - the context.
inURN - the module URN.
Returns:
the module info.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

start

void start(ClientContext inCtx,
           ModuleURN inURN)
           throws RemoteException
Starts the module with the specified URN.

Parameters:
inCtx - the context.
inURN - the module URN.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

stop

void stop(ClientContext inCtx,
          ModuleURN inURN)
          throws RemoteException
Stops the module with the specified URN.

Parameters:
inCtx - the context.
inURN - the module URN.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

delete

void delete(ClientContext inCtx,
            ModuleURN inURN)
            throws RemoteException
Deletes the module with the specified URN.

Parameters:
inCtx - the context.
inURN - the module URN.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

getProperties

MapWrapper<String,Object> getProperties(ClientContext inCtx,
                                        ModuleURN inURN)
                                        throws RemoteException
Fetches the (MXBean) properties of the module with the specified URN.

Parameters:
inCtx - the context.
inURN - the module URN.
Returns:
the property values of the module with the specified URN.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

setProperties

MapWrapper<String,Object> setProperties(ClientContext inCtx,
                                        ModuleURN inURN,
                                        MapWrapper<String,Object> inProperties)
                                        throws RemoteException
Sets the properties of the module with the specified URN.

Parameters:
inCtx - the context.
inURN - the module URN.
inProperties - the module properties that need to be set.
Returns:
the map of the properties that were successfully updated. If a particular could not be updated, its value will contain the exception with the details on the failure.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

createStrategy

ModuleURN createStrategy(ClientContext inCtx,
                         CreateStrategyParameters inParameters)
                         throws RemoteException
Creates a strategy.

Parameters:
inCtx - the context.
inParameters - the strategy creation parameters.
Returns:
the URN of the strategy module created.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

getStrategyCreateParms

CreateStrategyParameters getStrategyCreateParms(ClientContext inServiceContext,
                                                ModuleURN inURN)
                                                throws RemoteException
Returns the parameters used to create a strategy.

Parameters:
inServiceContext - the context.
inURN - the strategy module's URN.
Returns:
the parameters supplied when creating the strategy.
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.

sendData

void sendData(ClientContext inServiceContext,
              Object inData)
              throws RemoteException
Sends the given data to the strategy agent.

Note that if the type of data sent is not a Java basic type, context for that type must be added to both the client and server.

Parameters:
inServiceContext - a ClientContext value
inData - an Object value
Throws:
RemoteException - if there were errors communicating with the remote strategy agent.


Copyright © 2012. All Rights Reserved.