Examples of Transport


Examples of org.elasticsearch.transport.Transport

            transportClient = new TransportClient(settingsBuilder()
                    .put("cluster.name", internalCluster().getClusterName())
                    .put("name", "programmatic_transport_client")
                    .put("client.transport.nodes_sampler_interval", "1s")
                    .build());
            Transport transport = internalCluster().getDataNodeInstance(Transport.class);
            transportClient.addTransportAddress(transport.boundAddress().publishAddress());
        }

        return transportClient;
    }
View Full Code Here

Examples of org.fusesource.hawtdispatch.transport.Transport

    /**
     * Creates a client transport.
     */
    public static Transport connect(String location) throws Exception {
        for( Provider provider : providers.jsingletons()) {
          Transport rc = provider.connect(location);
          if( rc!=null ) {
            return rc;
          }
        }
        throw new IllegalArgumentException("Unknown transport connect uri: "+location);
View Full Code Here

Examples of org.glassfish.grizzly.Transport

        private InputInterceptor interceptor;

        @Override
        protected void onOpenInputSource() throws IOException {
            final Connection connection = parentStreamReader.getConnection();
            final Transport transport = connection.getTransport();
            final Reader reader = transport.getReader(connection);

            interceptor = new InputInterceptor();
            reader.read(connection, null, null, interceptor);
        }
View Full Code Here

Examples of org.glassfish.grizzly.config.dom.Transport

            ConfigSupport.apply(new SingleConfigCode<Transports>() {
                public Object run(Transports param)
                    throws PropertyVetoException, TransactionFailure {
                    boolean docrootAdded = false;
                    boolean accessLogAdded = false;
                    Transport newTransport = param.createChild(Transport.class);
                    newTransport.setName(transportName);
                    newTransport.setAcceptorThreads(acceptorThreads);
                    newTransport.setBufferSizeBytes(bufferSizeBytes);
                    newTransport.setByteBufferType(byteBufferType);
                    newTransport.setClassname(className);
                    newTransport.setDisplayConfiguration(displayConfiguration.toString());
                    newTransport.setEnableSnoop(enableSnoop.toString());
                    newTransport.setIdleKeyTimeoutSeconds(idleKeyTimeoutSeconds);
                    newTransport.setMaxConnectionsCount(maxConnectionsCount);
                    newTransport.setName(transportName);
                    newTransport.setReadTimeoutMillis(readTimeoutMillis);
                    newTransport.setSelectionKeyHandler(selectionKeyHandler);
                    newTransport.setSelectorPollTimeoutMillis(
                        selectorPollTimeoutMillis);
                    newTransport.setWriteTimeoutMillis(writeTimeoutMillis);
                    newTransport.setTcpNoDelay(tcpNoDelay.toString());
                    param.getTransport().add(newTransport);
                    return newTransport;
                }
            }, transports);
        } catch (TransactionFailure e) {
View Full Code Here

Examples of org.gpel.client.http.apache_http_client.Transport

            return;
        }

        logger.finest("Connecting a GPEL Engine at " + this.engineURL);
        try {
            Transport transport;
            if (isSecure()) {
                if (this.gpelUserX509Credential == null) {
                    logger.finest("Using ssl without any credential.");
                    this.gpelUserX509Credential = new GpelUserX509Credential(
                            null, XBayaSecurity.getTrustedCertificates());
                }
                transport = new Transport(this.gpelUserX509Credential);
            } else {
                // This one is phasing out.
                GpelUserCredentials credentials = new GpelUserCredentials(
                        "user", "password");
                transport = new Transport(credentials);
            }
            this.client = new GpelClient(this.engineURL, transport);
            this.client.setFilter(this.linksFilter);
            sendSafeEvent(new Event(Event.Type.GPEL_ENGINE_CONNECTED));
        } catch (RuntimeException e) {
View Full Code Here

Examples of org.gudy.azureus2.plugins.network.Transport

      throw new TransportException(e);
    }
  }
 
  public TransportFilter createTransportFilter(Connection connection, TransportCipher read_cipher, TransportCipher write_cipher) throws TransportException {
    Transport transport = connection.getTransport();
    com.aelitis.azureus.core.networkmanager.Transport core_transport;
    try {core_transport = ((TransportImpl)transport).coreTransport();}
    catch (IOException e) {throw new TransportException(e);}
   
    TransportHelper helper;
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.transport.Transport

   }

   public byte[] get(byte[] key, Flag[] flags) {
      for (int i = 0; i < transportFactory.getTransportCount(); i++) {
         try {
            Transport transport = getTransport(key, i == 0);
            try {
               short status = sendKeyOperation(key, transport, GET_REQUEST, flags, GET_RESPONSE);
               if (status == KEY_DOES_NOT_EXIST_STATUS) {
                  return null;
               }
               if (status == NO_ERROR_STATUS) {
                  return transport.readArray();
               }
            } finally {
               releaseTransport(transport);
            }
         } catch (TransportException te) {
View Full Code Here

Examples of org.infinispan.remoting.transport.Transport

      return globalConfiguration.getClusterName();
   }

   public List<Address> getMembers() {
      if (globalComponentRegistry == null) return null;
      Transport t = globalComponentRegistry.getComponent(Transport.class);
      return t == null ? null : t.getMembers();
   }
View Full Code Here

Examples of org.jboss.blacktie.jatmibroker.core.transport.Transport

    int correlationId = 0;
    synchronized (this) {
      correlationId = ++nextId;
      log.trace("Allocated next sessionId: " + correlationId);
    }
    Transport transport = getTransport(svc);
    Receiver endpoint = transport.createReceiver(correlationId,
        responseMonitor);
    temporaryQueues.put(correlationId, endpoint);
    log.trace("Added a queue for: " + correlationId);
    // TODO HANDLE TRANSACTION
    String type = null;
    String subtype = null;
    int len = 0;
    byte[] data = null;
    if (toSend != null) {
      data = toSend.serialize();
      type = toSend.getType();
      subtype = toSend.getSubtype();
      len = toSend.getLen();
    }

    String timeToLive = properties.getProperty("TimeToLive");
    int ttl = 0;

    if (timeToLive != null) {
      ttl = Integer.parseInt(timeToLive) * 1000;
    }
    transport.getSender(svc, false).send(endpoint.getReplyTo(), (short) 0,
        0, data, len, correlationId, flags, ttl, type, subtype);
    if ((flags & Connection.TPNOREPLY) == Connection.TPNOREPLY) {
      correlationId = 0;
    }
    log.debug("Returning cd: " + correlationId);
View Full Code Here

Examples of org.jboss.narayana.blacktie.jatmibroker.core.transport.Transport

  public void test() throws Exception {
    AtmiBrokerEnvXML xml = new AtmiBrokerEnvXML();
    Properties properties = xml.getProperties();

    TransportFactory factory = new TransportFactory(properties);
    Transport proxy = factory.createTransport();
    Sender serviceFactory = proxy.getSender("BAR", false);

    String aString = "Hello from Java Land";
    Receiver endpoint = proxy.createReceiver(1, null);
    serviceFactory.send(endpoint.getReplyTo(), (short) 0, 0,
        aString.getBytes(), aString.getBytes().length, 0, 0, 0,
        "X_OCTET", "");
    Message receive = endpoint.receive(0);

    assertNotNull(receive);
    String string = new String(receive.data).intern();
    String expectedResponse = "BAR SAYS HELLO";
    log.debug("Bar ServiceManager service_request response is " + string);
    log.debug("Bar ServiceManager service_request size of response is "
        + receive.len);
    assertEquals(string, expectedResponse);
    proxy.close();
    factory.close();
  }
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.