Package com.opengamma.component.rest

Examples of com.opengamma.component.rest.RemoteComponentServer


  //-------------------------------------------------------------------------
  public void test() throws Exception {
    ComponentManager manager = new ComponentManager("test");
    manager.start(CONFIG_RESOURCE_LOCATION);
   
    RemoteComponentServer remoteServer = new RemoteComponentServer(URI.create("http://localhost:" + getJettyPort() + "/jax"));
    assertTrue(remoteServer.getComponentServer().getComponentInfos().size() > 0);
   
    manager.getRepository().stop();
  }
View Full Code Here


  private boolean _publishRest = true;

  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    RemoteComponentServer remote = new RemoteComponentServer(_baseUri);
    ComponentServer server = remote.getComponentServer();
    for (ComponentInfo info : server.getComponentInfos()) {
      initComponent(repo, info);
    }
  }
View Full Code Here

      .append(System.getProperty("web.host", props.getProperty("opengamma.provider.host"))).append(':')
      .append(System.getProperty("web.port", props.getProperty("opengamma.provider.port")))
      .append(System.getProperty("web.path", props.getProperty("opengamma.provider.path")))
      .append("jax").toString();
    URI componentsUri = URI.create(baseUrl);
    RemoteComponentServer remote = new RemoteComponentServer(componentsUri);
    _components = remote.getComponentServer();
   
    URI uri = URI.create(props.getProperty("activeMQ.brokerURL"));
    ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(uri);
    JmsConnectorFactoryBean factory = new JmsConnectorFactoryBean();
    factory.setName(getClass().getSimpleName());
View Full Code Here

    pw.close();
    System.exit(0);
  }

  private static WatchListRecorder create(final URI serverUri, final String viewProcessorClassifier, final String securitySourceClassifier) {
    final RemoteComponentServer remote = new RemoteComponentServer(serverUri);
    final ComponentServer server = remote.getComponentServer();
    final ComponentInfo viewProcessorInfo = server.getComponentInfo(ViewProcessor.class, viewProcessorClassifier);
    final ComponentInfo securitySourceInfo = server.getComponentInfo(SecuritySource.class, securitySourceClassifier);

    final URI uri = URI.create(viewProcessorInfo.getAttribute(ComponentInfoAttributes.JMS_BROKER_URI));
    final ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(uri);
View Full Code Here

   * Connects to a server.
   *
   * @param uri  the URI to connect to,not null
   */
  public DemoViewProcessor(URI uri) {
    RemoteComponentServer server = new RemoteComponentServer(uri);
    _componentServer = server.getComponentServer();
  }
View Full Code Here

      baseUrl += "/jax";
    }
   
    _fudgeContext = OpenGammaFudgeContext.getInstance();
    final URI componentsUri = URI.create(baseUrl);
    final RemoteComponentServer remote = new RemoteComponentServer(componentsUri);
    _components = remote.getComponentServer();
    _configurationURI = URI.create(baseUrl + "/configuration/0");
    _configuration = FudgeRestClient.create().accessFudge(_configurationURI).get(FudgeMsg.class);
    final String activeMQBroker = _configuration.getString("activeMQ");
    final JmsConnectorFactoryBean factory = new JmsConnectorFactoryBean();
    factory.setName(getClass().getSimpleName());
View Full Code Here

  private URI _baseUri;

  //-------------------------------------------------------------------------
  @Override
  public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
    RemoteComponentServer remote = new RemoteComponentServer(_baseUri);
    ComponentServer server = remote.getComponentServer();
    for (ComponentInfo info : server.getComponentInfos()) {
      initComponent(beanFactory, info);
    }
  }
View Full Code Here

    if (configResourceLocation.endsWith("/jax") == false) {
      configResourceLocation += "/jax";
    }
   
    // Get the remote component server using the supplied URI
    RemoteComponentServer remoteComponentServer = new RemoteComponentServer(URI.create(configResourceLocation));
    ComponentServer componentServer = remoteComponentServer.getComponentServer();
   
    // Attempt to build a tool context of the specified type
    ToolContext toolContext;
    try {
      toolContext = toolContextClazz.newInstance();
View Full Code Here

   *
   * @param componentServerUri  the URI of the remote component server, not null
   */
  public RemoteComponentFactory(URI componentServerUri) {
    ArgumentChecker.notNull(componentServerUri, "componentServerUri");
    RemoteComponentServer remoteComponentServer = new RemoteComponentServer(componentServerUri);
    _baseUri = componentServerUri;
    _componentServer = remoteComponentServer.getComponentServer();
  }
View Full Code Here

  private boolean _publishRest = true;

  //-------------------------------------------------------------------------
  @Override
  public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) {
    RemoteComponentServer remote = new RemoteComponentServer(_baseUri);
    ComponentServer server = remote.getComponentServer();
    for (ComponentInfo info : server.getComponentInfos()) {
      initComponent(repo, info);
    }
  }
View Full Code Here

TOP

Related Classes of com.opengamma.component.rest.RemoteComponentServer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.