Examples of Gateway


Examples of com.gemstone.gemfire.cache.util.Gateway

    this.gateways = gateways;
  }
 
  private void configureGateways() {
    for (GatewayProxy gateway : gateways) {
      Gateway gw = gatewayHub.addGateway(
          gateway.getId(),
          gateway.getConcurrencyLevel() == null ? Gateway.DEFAULT_CONCURRENCY_LEVEL : gateway
              .getConcurrencyLevel());
      if (!CollectionUtils.isEmpty(gateway.getEndpoints())) {
        for (GatewayProxy.GatewayEndpoint endpoint : gateway.getEndpoints()) {
          gw.addEndpoint(endpoint.getId(), endpoint.getHost(), endpoint.getPort());
        }
      }
      if (!CollectionUtils.isEmpty(gateway.getListeners())) {
        for (GatewayEventListener listener : gateway.getListeners()) {
          gw.addListener(listener);
        }
      }
      if (gateway.getOrderPolicy() != null) {
        Assert.isTrue(validOrderPolicyValues.contains(gateway.getOrderPolicy()),
            "The value of order policy:'" + gateway.getOrderPolicy() + "' is invalid");
        gw.setOrderPolicy(OrderPolicy.valueOf(gateway.getOrderPolicy()));
      }
      if (gateway.getSocketBufferSize() != null) {
        gw.setSocketBufferSize(gateway.getSocketBufferSize());
      }

      if (gateway.getQueue() != null) {
        GatewayQueue queue = gateway.getQueue();
        GatewayQueueAttributes queueAttributes = gw.getQueueAttributes();
        if (queue.getAlertThreshold() != null) {
          queueAttributes.setAlertThreshold(queue.getAlertThreshold());
        }
        if (queue.getEnableBatchConflation() != null) {
          queueAttributes.setBatchConflation(queue.getEnableBatchConflation());
View Full Code Here

Examples of com.jpeterson.x10.Gateway

                throw new CruiseControlException("Trouble transmitting event " + events[ j ], e);
            }
        }

        if (transmitter instanceof Gateway) {
            Gateway gateway = (Gateway) transmitter;

            try {
                LOG.debug("Wait for empty queue...");
                gateway.waitGatewayState(Transmitter.QUEUE_EMPTY);
                LOG.debug("Done");
            } catch (InterruptedException e) {
            }

            LOG.debug("Deallocating...");
            try {
                gateway.deallocate();
            } catch (GatewayException e) {
                LOG.warn("Error deallocation gateway: " + e.getMessage(), e);
            }
            LOG.debug("Done");
        }
View Full Code Here

Examples of com.mes.sdk.gateway.Gateway

      .method(Settings.Method.POST)
      .timeout(10000)
      .verbose(true)
      .validateRequests(true);
   
    gateway = new Gateway(settings);
   
    try {
      GatewayRequest cRequest = new GatewayRequest(TransactionType.CREDIT)
      .cardData(
        new CcData()
View Full Code Here

Examples of eu.admire.clienttoolkit.Gateway

    // dispelFile, clientCerts, eprFile

    SSLClientSettings.setKeystores(args[1]);
    SSLClientSettings.disableHostnameVerification();
   
        Gateway mGateway;
    if (args.length >= 3)
    {
       // mGateway = GatewayFactory.get(Patcher.patchEPR(Util.getFileContentAsEPR(args[2]), new QName("http://www.admire-project.eu/gateway", "GatewayService")));
      mGateway = GatewayFactory.get(Patcher.patchEPR(Util.getFileContentAsEPR(args[2]), new QName("http://www.admire-project.eu/gateway", "GatewayService")));

    }
    else
    {
        try
            {
                mGateway = GatewayFactory.getDiscovered();
            }
            catch (InterruptedException e)
            {
                Thread.currentThread().interrupt();
                return null;
            }
    }
    System.out.println("gtw = " + mGateway.toString());
    String dispelFile = args[0]; //Util.getFileContentAsString(args[0]);
    System.out.println(dispelFile);
    GatewayProcess mGatewayProcess = mGateway.submit(dispelFile);

    // now can either wait for results (blocking) or sign up for
    // notifications (non-blocking)

    // 0 - blocking wait; 1 - wait with timeout; 2 - non-blocking
View Full Code Here

Examples of eu.admire.clienttoolkit.core.Gateway

            }
            else
            {
                String dispel = GraphConverter.convertToDISPEL(entry.getValue());
                LOG.debug("Remote DISPEL:\n" + dispel);
                Gateway gateway = null;
                GatewayProcess process = null;
                try
                {
                    gateway = GatewayFactory.get(location.getAddress());
                    process = gateway.submit(dispel);
                }
                catch (URISyntaxException e)
                {
                    LOG.error("Remote gateway address is invalid: " +
                            location.getAddress());
View Full Code Here

Examples of eu.admire.clienttoolkit.core.Gateway

        if (args.length >= 3)
        {
            Util.setupSecurity(args[2]);
        }
       
        Gateway mGateway = null;
        String address = args[1];
       
        mGateway = GatewayFactory.get(address);           
        System.out.println("Gateway version = " + mGateway.getVersion());
        System.out.println("Gateway Local Data Resources = "
                + mGateway.getGatewayLocalDataResources());
        System.out.println("Gateway All Data Resources = "
                + mGateway.getGatewayAllDataResources());
       
        System.out.println("Gateway = " + mGateway);
        String dispelFile = Util.getFileContentAsString(args[0]);
        System.out.println(dispelFile);
       
        // if ip:port forwarding needs to be done to work around firewall problems
        // on the GATEWAY use the following method
        // mGateway.setForwardAddress(new InetSocketAddress("193.122.18.162", 8310));
       
        GatewayProcess mGatewayProcess = mGateway.submit(dispelFile);
       
        // if ip:port forwarding needs to be done to work around firewall problems
        // on the OGSADAI-USMT use the following method
        // mGatewayProcess.setForwardAddress(new InetSocketAddress("193.122.18.162", 8300));
       
View Full Code Here

Examples of eu.admire.clienttoolkit.core.Gateway

        // get all resources from remote gateways
        for (Entry<String, GatewayLocation> gateway: mGatewayNamesToLocations.entrySet())
        {
            try
            {
                Gateway gtw = new GatewayClientREST(
                        new URI(gateway.getValue().getAddress()));
                for (String dataSource: gtw.getGatewayAllDataResources())
                {
                    addDataSourceAndGateway(dataSource, gateway.getKey());
                }
            }
            catch (Throwable e)
View Full Code Here

Examples of eu.admire.clienttoolkit.core.Gateway

      //Commented out following expulsion of USMT, might use something
      //similar later
      //SSLClientSettings.setKeystores(keystore);
      //SSLClientSettings.disableHostnameVerification();

      Gateway gw = GatewayFactory.get(url);

      ValidationResult validationResult = gw.validate(Util
          .getFileContentAsString(dispel.getLocation().toString()));

      if (validationResult.getSubmittedGraphs().size() > 0) {

        graph = validationResult.getSubmittedGraphs().get(0);
View Full Code Here

Examples of eu.admire.clienttoolkit.core.Gateway

    @Override
    public void run()
    {
        try {
            Gateway gw = GatewayFactory.get(mGatewayURL);

            GatewayProcess gatewayProcess = gw.submit(
                    Util.getFileContentAsString(
                            mDispel.getLocation().toString()));
            GatewayProcessManager.getInstance().register(gatewayProcess,
                    mDispel.getName());
View Full Code Here

Examples of eu.admire.clienttoolkit.core.Gateway

        "submit echo;";

  @Test
  public void testSubmittingDISPEL() throws Exception
  {
      Gateway g = GatewayFactory.get(GATEWAY_ADDRESS);
      GatewayProcess p = g.submit(DISPEL_REQUEST);
      try
      {
          p.waitForResults();
         
          Map<String, Result> results = p.getResults();
          Result result = results.get("results");
          assertNotNull(result);
          String resultStr = Util.getAsString(result);
          assertEquals("Received wrong result", "[Hello World2!]", resultStr);
         
          Errors e = p.getErrors();
          assertNull("Caught a compile time error", e.getCompiletime());
          assertNull("Caught a runtime error", e.getRuntime());
          assertNull("Caught a registration error", e.getRegistration());
          assertNull("Caught a system error", e.getSystem());
   
          assertEquals(ProcessingStatus.COMPLETED, p.getStatus());
         
            // list all processes and check that this one in the list
          List<String> processes = g.getGatewayProcesses();
          boolean contained = false;
          for (String process : processes)
          {
              if (p.getAddress().endsWith(process))
              {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.