Package org.marketcetera.server
Class DareApplication
- java.lang.Object
-
- org.marketcetera.server.DareApplication
-
@EnableAutoConfiguration @SpringBootConfiguration @EnableTransactionManagement @EntityScan(basePackages={"org.marketcetera","com.marketcetera"}) @SpringBootApplication(scanBasePackages={"org.marketcetera","com.marketcetera"}) @EnableJpaRepositories(basePackages={"org.marketcetera","com.marketcetera"}) public class DareApplication extends ObjectApplication entry point for the community DARE application.- Since:
- $Release$
- Version:
- $Id$
- Author:
- Colin DuPlantis
-
-
Field Summary
Fields Modifier and Type Field Description private List<String>contextPathClassescontext path classes used to marshal and unmarshal XML valuesprivate intmetricServiceLogReporterIntervalinterval at which to report metricsprivate StringprivateKeyPathprivate key path for SSL certprivate StringprovisioningDirectoryprovisioning directory baseprivate StringpublicKeyPathpublic key path for SSL certprivate intrpcPortRPC services portprivate StringserverHostnameserver hostnameprivate booleanuseSslindicates whether to use SSL or notprivate intwebServerPortweb services port
-
Constructor Summary
Constructors Constructor Description DareApplication()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description springfox.documentation.spring.web.plugins.Docketapi()Create the Swagger API component.private springfox.documentation.service.ApiInfoapiInfo()Get the API info (REST Swagger) for DARE.AdminRpcService<javax.jms.ServerSession>getAdminRpcService(org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)Get the admin RPC service.org.marketcetera.util.ws.stateful.AuthenticatorgetAuthenticator()Get the authenticator service.AverageFillPriceFactorygetAverageFillPriceFactory()Get the average fill price factory value.BrokerSelectorgetBrokerSelector()Get the default broker selector to use.ClusterDataFactorygetClusterDataFactory()Get the cluster data factory bean.ClusterRpcService<javax.jms.ServerSession>getClusterRpcService(org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)Get the Cluster RPC service.DataFlowRpcService<javax.jms.ServerSession>getDataFlowRpcService(org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)Get the Data Flow RPC service.org.marketcetera.util.ws.stateful.PortUserProxygetEmbeddedWebServerPortUserProxy()Get the port user proxy for the embedded web server.EsperEnginegetEsperEngine()Get the Esper engine value.EventBusEsperConnectorgetEventBusEsperConnector()Get the Event Bus <-> Esper connector value.FixAdminRpcService<javax.jms.ServerSession>getFixAdminRpcService(org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)Get the Fix Admin RPC service.FixSessionProvidergetFixSessionProvider()Get the FIX session provider bean.IncomingTradeMessageBroadcastConnectorgetIncomingTradeMessageBroadcastConnector()Get the IncomingTradeMessageBroadcastConnector value.IncomingTradeMessageConverterConnectorgetIncomingTradeMessageConverterConnector()Get the incoming trade message converter connector value.IncomingTradeMessagePersistenceConnectorgetIncomingTradeMessagePersistenceConnector()Get the incoming trade message persistence connector value.DirectMarketDataClientgetMarketDataClient()Get the market data client value.MarketDataRpcService<javax.jms.ServerSession>getMarketDataRpcService(org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)Get the Market Data RPC service.quickfix.MessageFactorygetMessageFactory()Get the message factory bean.MessageOwnerServicegetMessageOwnerService()Get the message owner service value.HibernateMessageStoreConfigurationgetMessageStoreConfiguration()Get the message store configuration value.MetricServiceDbReportergetMetricServiceReporter()Get the metric service reporter value.ModuleManagergetModuleManager()Get the module manager value.MutableActiveFixSessionFactorygetMutableActiveFixSessionFactory()Get the mutable active FIX session factory bean.MutableFixSessionFactorygetMutableFixSessionFactory()Get the mutable FIX session factory bean.OrderConverterConnectorgetOrderConverterConnector()Get the order converter connector value.OutgoingMessageCachingConnectorgetOutgoingMessageCachingConnector()Get the outgoing message caching connector value.OutgoingMessagePersistenceConnectorgetOutgoingMessagePersistenceConnector()Get the outgoing message persistence connector value.PasswordServicegetPasswordService()Get the password service value.PermissionFactorygetPermissionFactory()Get the permission factory value.ProvisioningAgentgetProvisioningAgent()Get the provisioning agent bean.QuickFIXSendergetQuickFixSender()Get the QFJ sender implementation for DARE.RoleFactorygetRoleFactory()Get the role factory value.org.marketcetera.rpc.server.RpcServergetRpcServer(List<io.grpc.BindableService> inServiceSpecs)Get the RPC server value.ServerFixSessionFactorygetServerFixSessionFactory()Get the server FIX session factory bean.org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession>getSessionManager()Get the session manager service.DirectStrategyClientFactorygetStrategyClientFactory()Get the strategy client factory value.PersistentStrategyInstanceFactorygetStrategyInstanceFactory()Get the strategy instance factory value.PersistentStrategyMessageFactorygetStrategyMessageFactory()Get the strategy message factory value.StrategyRpcServer<javax.jms.ServerSession>getStrategyRpcService(org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)Get the Strategy RPC service.StrategyServicegetStrategyService()Get the strategy service bean.SymbolResolverServicegetSymbolResolverService()Get the symbol resolver service value.DirectTradeClientgetTradeClient()Get the trade client value.TradeRpcService<javax.jms.ServerSession>getTradeRpcService(org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)Get the Trade RPC service.UserAttributeFactorygetUserAttributeFactory()Get the user attribute factory value.UserAttributeServicegetUserAttributeService()Get the user attribute service value.UserFactorygetUserFactory()Get the user factory value.UserServicegetUserService()Get the user service bean.XmlServicegetXmlService()Get the XmlService value.static voidmain(String[] inArgs)Main application entry.voidstart()Validate and start the object.
-
-
-
Field Detail
-
useSsl
@Value("${metc.security.use.ssl:false}") private boolean useSslindicates whether to use SSL or not
-
publicKeyPath
@Value("${metc.security.ssl.public.key.path:#{null}}") private String publicKeyPathpublic key path for SSL cert
-
privateKeyPath
@Value("${metc.security.ssl.private.key.path:#{null}}") private String privateKeyPathprivate key path for SSL cert
-
webServerPort
@Value("${server.port}") private int webServerPortweb services port
-
serverHostname
@Value("${metc.ws.hostname:0.0.0.0}") private String serverHostnameserver hostname
-
rpcPort
@Value("${metc.rpc.port}") private int rpcPortRPC services port
-
metricServiceLogReporterInterval
@Value("${metc.metric.service.log.reporter.interval:10}") private int metricServiceLogReporterIntervalinterval at which to report metrics
-
contextPathClasses
@Value("${metc.xml.context.path.classes}") private List<String> contextPathClassescontext path classes used to marshal and unmarshal XML values
-
provisioningDirectory
@Value("${metc.provisioning.directory:./instances/provisioning}") private String provisioningDirectoryprovisioning directory base
-
-
Method Detail
-
main
public static void main(String[] inArgs)
Main application entry.- Parameters:
inArgs- aString[]value
-
start
@PostConstruct public void start()
Validate and start the object.
-
getPasswordService
@Bean public PasswordService getPasswordService()
Get the password service value.- Returns:
- a
PasswordServicevalue
-
getStrategyService
@Bean public StrategyService getStrategyService()
Get the strategy service bean.- Returns:
- a
StrategyServicevalue
-
getProvisioningAgent
@Bean public ProvisioningAgent getProvisioningAgent()
Get the provisioning agent bean.- Returns:
- a
ProvisioningAgentvalue
-
getXmlService
@Bean public XmlService getXmlService() throws ClassNotFoundException
Get the XmlService value.- Returns:
- an
XmlServicevalue - Throws:
ClassNotFoundException- if a context class path cannot be resolved
-
getStrategyClientFactory
@Bean public DirectStrategyClientFactory getStrategyClientFactory()
Get the strategy client factory value.- Returns:
- a
DirectStrategyClientFactoryvalue
-
getMarketDataClient
@Bean public DirectMarketDataClient getMarketDataClient()
Get the market data client value.- Returns:
- a
DirectMarketDataClientvalue
-
getTradeClient
@Bean public DirectTradeClient getTradeClient()
Get the trade client value.- Returns:
- a
DirectTradeClientvalue
-
getStrategyMessageFactory
@Bean public PersistentStrategyMessageFactory getStrategyMessageFactory()
Get the strategy message factory value.- Returns:
- a
PersistentStrategyMessageFactoryvalue
-
getStrategyInstanceFactory
@Bean public PersistentStrategyInstanceFactory getStrategyInstanceFactory()
Get the strategy instance factory value.- Returns:
- a
StrategyInstanceFactoryvalue
-
getAverageFillPriceFactory
@Bean public AverageFillPriceFactory getAverageFillPriceFactory()
Get the average fill price factory value.- Returns:
- an
AverageFillPriceFactoryvalue
-
getMessageStoreConfiguration
@Bean public HibernateMessageStoreConfiguration getMessageStoreConfiguration()
Get the message store configuration value.- Returns:
- a
HibernateMessageStoreConfigurationvalue
-
getUserService
@Bean public UserService getUserService()
Get the user service bean.- Returns:
- a
UserServicevalue
-
getFixSessionProvider
@Bean public FixSessionProvider getFixSessionProvider()
Get the FIX session provider bean.- Returns:
- a
FixSessionProvidervalue
-
getMessageFactory
@Bean public quickfix.MessageFactory getMessageFactory()
Get the message factory bean.- Returns:
- a
quickfix.MessageFactoryvalue
-
getClusterDataFactory
@Bean public ClusterDataFactory getClusterDataFactory()
Get the cluster data factory bean.- Returns:
- a
ClusterDataFactoryvalue
-
getMutableFixSessionFactory
@Bean public MutableFixSessionFactory getMutableFixSessionFactory()
Get the mutable FIX session factory bean.- Returns:
- a
MutableFixSessionFactoryvalue
-
getMutableActiveFixSessionFactory
@Bean public MutableActiveFixSessionFactory getMutableActiveFixSessionFactory()
Get the mutable active FIX session factory bean.- Returns:
- a
MutableActiveFixSessionFactoryvalue
-
getServerFixSessionFactory
@Bean public ServerFixSessionFactory getServerFixSessionFactory()
Get the server FIX session factory bean.- Returns:
- a
ServerFixSessionFactoryvalue
-
getMessageOwnerService
@Bean public MessageOwnerService getMessageOwnerService()
Get the message owner service value.- Returns:
- a
MessageOwnerServicevalue
-
getQuickFixSender
@Bean public QuickFIXSender getQuickFixSender()
Get the QFJ sender implementation for DARE.- Returns:
- a
QuickFIXSendervalue
-
getMetricServiceReporter
@Bean public MetricServiceDbReporter getMetricServiceReporter()
Get the metric service reporter value.- Returns:
- a
MetricServiceDbReportervalue
-
api
@Bean public springfox.documentation.spring.web.plugins.Docket api()
Create the Swagger API component.- Returns:
- a
Docketvalue
-
getEmbeddedWebServerPortUserProxy
@Bean public org.marketcetera.util.ws.stateful.PortUserProxy getEmbeddedWebServerPortUserProxy()
Get the port user proxy for the embedded web server.- Returns:
- a
PortUserProxyvalue
-
getRpcServer
@Bean public org.marketcetera.rpc.server.RpcServer getRpcServer(@Autowired(required=false) List<io.grpc.BindableService> inServiceSpecs) throws ExceptionGet the RPC server value.- Parameters:
inServiceSpecs- aList<BindableService>value- Returns:
- an
RpcServervalue - Throws:
Exception- if the server cannot be created
-
getAdminRpcService
@Bean public AdminRpcService<javax.jms.ServerSession> getAdminRpcService(@Autowired org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, @Autowired org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)
Get the admin RPC service.- Parameters:
inAuthenticator- anAuthenticatorvalueinSessionManager- aSessionManager<ServerSession>value- Returns:
- an
AdminRpcService<ServerSession>value
-
getTradeRpcService
@Bean public TradeRpcService<javax.jms.ServerSession> getTradeRpcService(@Autowired org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, @Autowired org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)
Get the Trade RPC service.- Parameters:
inAuthenticator- anAuthenticatorvalueinSessionManager- aSessionManager<ServerSession>value- Returns:
- a
TradeRpcService<ServerSession>value
-
getStrategyRpcService
@Bean public StrategyRpcServer<javax.jms.ServerSession> getStrategyRpcService(@Autowired org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, @Autowired org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)
Get the Strategy RPC service.- Parameters:
inAuthenticator- anAuthenticatorvalueinSessionManager- aSessionbManager<ServerSession>value- Returns:
- a
TradeRpcService<ServerSession>value
-
getFixAdminRpcService
@Bean public FixAdminRpcService<javax.jms.ServerSession> getFixAdminRpcService(@Autowired org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, @Autowired org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)
Get the Fix Admin RPC service.- Parameters:
inAuthenticator- anAuthenticatorvalueinSessionManager- aSessionManager<ServerSession>value- Returns:
- a
FixAdminRpcService<ServerSession>value
-
getDataFlowRpcService
@Bean public DataFlowRpcService<javax.jms.ServerSession> getDataFlowRpcService(@Autowired org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, @Autowired org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)
Get the Data Flow RPC service.- Parameters:
inAuthenticator- anAuthenticatorvalueinSessionManager- aSessionManager<ServerSession>value- Returns:
- a
DataFlowRpcService<ServerSession>value
-
getMarketDataRpcService
@Bean public MarketDataRpcService<javax.jms.ServerSession> getMarketDataRpcService(@Autowired org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, @Autowired org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)
Get the Market Data RPC service.- Parameters:
inAuthenticator- anAuthenticatorvalueinSessionManager- aSessionManager<ServerSession>value- Returns:
- a
MarketDataRpcService<ServerSession>value
-
getClusterRpcService
@Bean public ClusterRpcService<javax.jms.ServerSession> getClusterRpcService(@Autowired org.marketcetera.util.ws.stateful.Authenticator inAuthenticator, @Autowired org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> inSessionManager)
Get the Cluster RPC service.- Parameters:
inAuthenticator- anAuthenticatorvalueinSessionManager- aSessionManager<ServerSession>value- Returns:
- a
ClusterRpcService<ServerSession>value
-
getModuleManager
@Bean public ModuleManager getModuleManager()
Get the module manager value.- Returns:
- a
ModuleManagervalue
-
getSymbolResolverService
@Bean public SymbolResolverService getSymbolResolverService()
Get the symbol resolver service value.- Returns:
- a
SymbolResolverServicevalue
-
getAuthenticator
@Bean public org.marketcetera.util.ws.stateful.Authenticator getAuthenticator()
Get the authenticator service.- Returns:
- an
Authenticatorvalue
-
getSessionManager
@Bean public org.marketcetera.util.ws.stateful.SessionManager<javax.jms.ServerSession> getSessionManager()
Get the session manager service.- Returns:
- a
SessionManager<ServerSession>value
-
getUserAttributeFactory
@Bean public UserAttributeFactory getUserAttributeFactory()
Get the user attribute factory value.- Returns:
- a
UserAttributevalue
-
getUserAttributeService
@Bean public UserAttributeService getUserAttributeService()
Get the user attribute service value.- Returns:
- a
UserAttributeServicevalue
-
getBrokerSelector
@Bean public BrokerSelector getBrokerSelector()
Get the default broker selector to use.- Returns:
- a
Selectorvalue
-
getOrderConverterConnector
@Bean public OrderConverterConnector getOrderConverterConnector()
Get the order converter connector value.- Returns:
- an
OrderConverterConnectorvalue
-
getOutgoingMessageCachingConnector
@Bean public OutgoingMessageCachingConnector getOutgoingMessageCachingConnector()
Get the outgoing message caching connector value.- Returns:
- an
OutgoingMessageCachingConnectorvalue
-
getOutgoingMessagePersistenceConnector
@Bean public OutgoingMessagePersistenceConnector getOutgoingMessagePersistenceConnector()
Get the outgoing message persistence connector value.- Returns:
- an
OutgoingMessagePersistenceConnectorvalue
-
getIncomingTradeMessageConverterConnector
@Bean public IncomingTradeMessageConverterConnector getIncomingTradeMessageConverterConnector()
Get the incoming trade message converter connector value.- Returns:
- an
IncomingTradeMessageConverterConnectorvalue
-
getIncomingTradeMessagePersistenceConnector
@Bean public IncomingTradeMessagePersistenceConnector getIncomingTradeMessagePersistenceConnector()
Get the incoming trade message persistence connector value.- Returns:
- an
IncomingTradeMessagePersistenceConnectorvalue
-
getIncomingTradeMessageBroadcastConnector
@Bean public IncomingTradeMessageBroadcastConnector getIncomingTradeMessageBroadcastConnector()
Get the IncomingTradeMessageBroadcastConnector value.- Returns:
- an
IncomingTradeMessageBroadcastConnectorvalue
-
getEsperEngine
@Bean public EsperEngine getEsperEngine()
Get the Esper engine value.- Returns:
- an
EsperEnginevalue
-
getEventBusEsperConnector
@Bean public EventBusEsperConnector getEventBusEsperConnector()
Get the Event Bus <-> Esper connector value.- Returns:
- an
EventBusEsperConnectorvalue
-
getPermissionFactory
@Bean public PermissionFactory getPermissionFactory()
Get the permission factory value.- Returns:
- a
PermissionFactoryvalue
-
getRoleFactory
@Bean public RoleFactory getRoleFactory()
Get the role factory value.- Returns:
- a
RoleFactoryvalue
-
getUserFactory
@Bean public UserFactory getUserFactory()
Get the user factory value.- Returns:
- a
UserFactoryvalue
-
apiInfo
private springfox.documentation.service.ApiInfo apiInfo()
Get the API info (REST Swagger) for DARE.- Returns:
- an
ApiInfovalue
-
-