org.marketcetera.client
Interface Service

All Superinterfaces:
ServiceBase, StatelessServiceBase

public interface Service
extends ServiceBase

The application's web services.

Since:
1.0.0
Version:
$Id: Service.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Field Summary
static String BROKER_STATUS_TOPIC
          The topic on which the client receives broker status notifications.
static String REPLY_TOPIC_PREFIX
          The prefix of the topic on which the client receives server replies.
static String REQUEST_QUEUE
          The queue on which the client places orders for the server.
 
Method Summary
 MapWrapper<PositionKey<Equity>,BigDecimal> getAllEquityPositionsAsOf(ClientContext context, DateWrapper date)
          Returns all the open positions for equity instruments based on reports, generated and received on or before the supplied date in UTC to the client with the given context.
 MapWrapper<PositionKey<Future>,BigDecimal> getAllFuturePositionsAsOf(ClientContext inContext, DateWrapper inDate)
          Returns all the open positions for future instruments based on reports, generated and received on or before the supplied date in UTC to the client with the given context.
 MapWrapper<PositionKey<Option>,BigDecimal> getAllOptionPositionsAsOf(ClientContext context, DateWrapper date)
          Returns the aggregate position of each option (option,account,actor) tuple based on all reports received for each tuple on or before the supplied date in UTC, and which are visible to the given user.
 BrokersStatus getBrokersStatus(ClientContext context)
          Returns the server's broker status to the client with the given context.
 BigDecimal getEquityPositionAsOf(ClientContext context, DateWrapper date, Equity equity)
          Returns the position of the supplied equity instrument based on reports, generated and received on or before the supplied date in UTC to the client with the given context.
 BigDecimal getFuturePositionAsOf(ClientContext inContext, DateWrapper inDate, Future inFuture)
          Returns the position of the supplied future instrument based on reports, generated and received on or before the supplied date in UTC to the client with the given context.
 String getNextOrderID(ClientContext context)
          Returns the next server order ID to the client with the given context.
 BigDecimal getOptionPositionAsOf(ClientContext context, DateWrapper date, Option option)
          Gets the current aggregate position for the option instrument based on execution reports received on or before the supplied date in UTC, and which are visible to the given user.
 MapWrapper<PositionKey<Option>,BigDecimal> getOptionPositionsAsOf(ClientContext context, DateWrapper date, String... rootSymbols)
          Returns the aggregate position of each option (option,account,actor) tuple based on all reports received for each tuple on or before the supplied date in UTC, and which are visible to the given user.
 Collection<String> getOptionRoots(ClientContext context, String inUnderlying)
          Returns the collection of known option roots for the underlying symbol.
 ReportBaseImpl[] getReportsSince(ClientContext context, DateWrapper date)
          Returns all the reports (execution report and order cancel rejects) generated and received by the server since the supplied date to the client with the given context.
 String getUnderlying(ClientContext context, String optionRoot)
          Returns the underlying symbol for the supplied option root, if a mapping is found for it.
 String getUserData(ClientContext inContext)
          Gets the user data associated with the current user.
 UserInfo getUserInfo(ClientContext context, UserID id)
          Returns the information of the user with the given ID to the client with the given context.
 void heartbeat(ClientContext context)
          Sends a heartbeat to the server.
 void setUserData(ClientContext inContext, String inData)
          Sets the user data associated with the current user.
 

Field Detail

REPLY_TOPIC_PREFIX

static final String REPLY_TOPIC_PREFIX
The prefix of the topic on which the client receives server replies.

See Also:
Constant Field Values

BROKER_STATUS_TOPIC

static final String BROKER_STATUS_TOPIC
The topic on which the client receives broker status notifications.

See Also:
Constant Field Values

REQUEST_QUEUE

static final String REQUEST_QUEUE
The queue on which the client places orders for the server.

See Also:
Constant Field Values
Method Detail

getBrokersStatus

BrokersStatus getBrokersStatus(ClientContext context)
                               throws RemoteException
Returns the server's broker status to the client with the given context.

Parameters:
context - The context.
Returns:
The status.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getUserInfo

UserInfo getUserInfo(ClientContext context,
                     UserID id)
                     throws RemoteException
Returns the information of the user with the given ID to the client with the given context.

Parameters:
context - The context.
id - The user ID.
Returns:
The information.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getReportsSince

ReportBaseImpl[] getReportsSince(ClientContext context,
                                 DateWrapper date)
                                 throws RemoteException
Returns all the reports (execution report and order cancel rejects) generated and received by the server since the supplied date to the client with the given context.

Parameters:
context - The context.
date - The date, in UTC.
Returns:
The reports.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getEquityPositionAsOf

BigDecimal getEquityPositionAsOf(ClientContext context,
                                 DateWrapper date,
                                 Equity equity)
                                 throws RemoteException
Returns the position of the supplied equity instrument based on reports, generated and received on or before the supplied date in UTC to the client with the given context.

Parameters:
context - The context.
date - The date, in UTC.
equity - The equity instrument.
Returns:
The position.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getAllEquityPositionsAsOf

MapWrapper<PositionKey<Equity>,BigDecimal> getAllEquityPositionsAsOf(ClientContext context,
                                                                     DateWrapper date)
                                                                     throws RemoteException
Returns all the open positions for equity instruments based on reports, generated and received on or before the supplied date in UTC to the client with the given context.

Parameters:
context - The context.
date - The date, in UTC.
Returns:
The open positions.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getFuturePositionAsOf

BigDecimal getFuturePositionAsOf(ClientContext inContext,
                                 DateWrapper inDate,
                                 Future inFuture)
                                 throws RemoteException
Returns the position of the supplied future instrument based on reports, generated and received on or before the supplied date in UTC to the client with the given context.

Parameters:
inContext - The context.
inDate - The date, in UTC.
inFuture - The equity instrument.
Returns:
The position.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getAllFuturePositionsAsOf

MapWrapper<PositionKey<Future>,BigDecimal> getAllFuturePositionsAsOf(ClientContext inContext,
                                                                     DateWrapper inDate)
                                                                     throws RemoteException
Returns all the open positions for future instruments based on reports, generated and received on or before the supplied date in UTC to the client with the given context.

Parameters:
inContext - The context.
inDate - The date, in UTC.
Returns:
The open positions.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getOptionPositionAsOf

BigDecimal getOptionPositionAsOf(ClientContext context,
                                 DateWrapper date,
                                 Option option)
                                 throws RemoteException
Gets the current aggregate position for the option instrument based on execution reports received on or before the supplied date in UTC, and which are visible to the given user.

Buy trades result in positive positions. All other kinds of trades result in negative positions.

Parameters:
context - The context.
date - The date, in UTC.
option - The option instrument.
Returns:
The position.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getAllOptionPositionsAsOf

MapWrapper<PositionKey<Option>,BigDecimal> getAllOptionPositionsAsOf(ClientContext context,
                                                                     DateWrapper date)
                                                                     throws RemoteException
Returns the aggregate position of each option (option,account,actor) tuple based on all reports received for each tuple on or before the supplied date in UTC, and which are visible to the given user.

Buy trades result in positive positions. All other kinds of trades result in negative positions.

Parameters:
context - The context.
date - The date, in UTC.
Returns:
The open positions.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getOptionPositionsAsOf

MapWrapper<PositionKey<Option>,BigDecimal> getOptionPositionsAsOf(ClientContext context,
                                                                  DateWrapper date,
                                                                  String... rootSymbols)
                                                                  throws RemoteException
Returns the aggregate position of each option (option,account,actor) tuple based on all reports received for each tuple on or before the supplied date in UTC, and which are visible to the given user. The aggregate positions are only returned for the set of option root symbols supplied.

Buy trades result in positive positions. All other kinds of trades result in negative positions.

Parameters:
context - The context.
date - The date, in UTC.
rootSymbols - The option root symbols.
Returns:
The open positions.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getNextOrderID

String getNextOrderID(ClientContext context)
                      throws RemoteException
Returns the next server order ID to the client with the given context.

Parameters:
context - The context.
Returns:
The next order ID.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getUnderlying

String getUnderlying(ClientContext context,
                     String optionRoot)
                     throws RemoteException
Returns the underlying symbol for the supplied option root, if a mapping is found for it. Null otherwise.

Parameters:
context - The context.
optionRoot - The option root symbol.
Returns:
The underlying symbol for the supplied option root. null, if no mapping was found.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getOptionRoots

Collection<String> getOptionRoots(ClientContext context,
                                  String inUnderlying)
                                  throws RemoteException
Returns the collection of known option roots for the underlying symbol.

Parameters:
context - The context.
inUnderlying - The underlying symbol.
Returns:
The sorted collection of option roots if mappings are found for the option root. A null collection is returned otherwise.
Throws:
RemoteException - Thrown if the operation cannot be completed.

heartbeat

void heartbeat(ClientContext context)
               throws RemoteException
Sends a heartbeat to the server.

Parameters:
context - The context.
Throws:
RemoteException - Thrown if the operation cannot be completed.

getUserData

String getUserData(ClientContext inContext)
                   throws RemoteException
Gets the user data associated with the current user.

Parameters:
inContext - a ClientContent value
Returns:
a String value
Throws:
RemoteException - if the operation cannot be completed

setUserData

void setUserData(ClientContext inContext,
                 String inData)
                 throws RemoteException
Sets the user data associated with the current user.

Parameters:
inContext - a ClientContent value
inData - a String value
Throws:
RemoteException - if the operation cannot be completed


Copyright © 2012. All Rights Reserved.