Package org.mokai

Examples of org.mokai.Connector


  @Test(expectedExceptions=ObjectAlreadyExistsException.class)
  public void shouldFailToAddExistingApplication() throws Exception {
    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

    try {
      Connector connector = mock(Connector.class);

      // create an application
      routingEngine.addApplication("test", connector);

      // try to create another application with the same id
View Full Code Here


  public void testStartRoutingEngineWithSlowConnectors() throws Exception {
    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

    try {
      Processor connection = new MockServiceableConnector().withStartWaitTime(5000);
      Connector application = new MockServiceableConnector().withStartWaitTime(5000);

      routingEngine.addConnection("test", connection);
      routingEngine.addApplication("test", application);

      long startTime = new Date().getTime();
View Full Code Here

   */
  public static JSONObject getConnectorJSON(ConnectorService connectorService) throws JSONException {
    JSONObject jsonConnector = new ConnectorUI(connectorService).toJSON();

    // include configuration
    Connector connector = connectorService.getConnector();
    if ( ExposableConfiguration.class.isInstance(connector) ) {
      jsonConnector.put( "configuration", getConfigJSON((ExposableConfiguration<?>) connector) );
    }

    // include acceptors
View Full Code Here

TOP

Related Classes of org.mokai.Connector

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.