Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TMultiplexedProtocol


      transport.open();
    } catch (TTransportException e) {
      throw new IOException("Transport exception while opening transport: " + e.getMessage(), e);
    }
    LOGGER.info("Successfully opened transport: " + transport + " to " + serverAddress);
    TMultiplexedProtocol protocol = new TMultiplexedProtocol(
      new TBinaryProtocol(transport),
      SentryPolicyStoreProcessor.SENTRY_POLICY_SERVICE_NAME);
    client = new SentryPolicyService.Client(protocol);
    LOGGER.info("Successfully created client");
  }
View Full Code Here


    public static <T extends org.apache.thrift.TServiceClient> T createApplicationCatalogClient(String serverHost, int serverPort, Class<T> type) throws Exception{
        try {
            TTransport transport = new TSocket(serverHost, serverPort);
            transport.open();
            TProtocol protocol = new TBinaryProtocol(transport);
            TMultiplexedProtocol mp = new TMultiplexedProtocol(protocol, "AppCatalog");
            return  type.getConstructor(TProtocol.class).newInstance(mp);
        } catch (TTransportException e) {
            throw new AiravataClientConnectException("Unable to connect to the server at "+serverHost+":"+serverPort);
        } catch (Exception e) {
      throw new Exception("Invalid Airavata API Service "+type.getClass().getCanonicalName());
View Full Code Here

TOP

Related Classes of org.apache.thrift.protocol.TMultiplexedProtocol

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.