Java 类org.apache.thrift7.transport.TTransportFactory 实例源码

项目:jstorm-0.9.6.3-    文件:SaslTransportPlugin.java   
@Override
public TServer getServer(int port, TProcessor processor)
        throws IOException, TTransportException {
    TTransportFactory serverTransportFactory = getServerTransportFactory();

    // define THsHaServer args
    // original: THsHaServer + TNonblockingServerSocket
    // option: TThreadPoolServer + TServerSocket
    TServerSocket serverTransport = new TServerSocket(port);
    TThreadPoolServer.Args server_args = new TThreadPoolServer.Args(
            serverTransport).processor(new TUGIWrapProcessor(processor))
            .minWorkerThreads(64).maxWorkerThreads(64)
            .protocolFactory(new TBinaryProtocol.Factory());
    if (serverTransportFactory != null)
        server_args.transportFactory(serverTransportFactory);

    // construct THsHaServer
    return new TThreadPoolServer(server_args);
}
项目:learn_jstorm    文件:SaslTransportPlugin.java   
public TServer getServer(int port, TProcessor processor)
        throws IOException, TTransportException {
    TTransportFactory serverTransportFactory = getServerTransportFactory();

    // define THsHaServer args
    // original: THsHaServer + TNonblockingServerSocket
    // option: TThreadPoolServer + TServerSocket
    TServerSocket serverTransport = new TServerSocket(port);
    TThreadPoolServer.Args server_args = new TThreadPoolServer.Args(
            serverTransport).processor(new TUGIWrapProcessor(processor))
            .minWorkerThreads(64).maxWorkerThreads(64)
            .protocolFactory(new TBinaryProtocol.Factory());
    if (serverTransportFactory != null)
        server_args.transportFactory(serverTransportFactory);

    // construct THsHaServer
    return new TThreadPoolServer(server_args);
}
项目:Tstream    文件:SaslTransportPlugin.java   
public TServer getServer(int port, TProcessor processor)
        throws IOException, TTransportException {
    TTransportFactory serverTransportFactory = getServerTransportFactory();

    // define THsHaServer args
    // original: THsHaServer + TNonblockingServerSocket
    // option: TThreadPoolServer + TServerSocket
    TServerSocket serverTransport = new TServerSocket(port);
    TThreadPoolServer.Args server_args = new TThreadPoolServer.Args(
            serverTransport).processor(new TUGIWrapProcessor(processor))
            .minWorkerThreads(64).maxWorkerThreads(64)
            .protocolFactory(new TBinaryProtocol.Factory());
    if (serverTransportFactory != null)
        server_args.transportFactory(serverTransportFactory);

    // construct THsHaServer
    return new TThreadPoolServer(server_args);
}
项目:jstorm-0.9.6.3-    文件:DigestSaslTransportPlugin.java   
@Override
protected TTransportFactory getServerTransportFactory() throws IOException {
    // create an authentication callback handler
    CallbackHandler serer_callback_handler = new ServerCallbackHandler(
            login_conf);

    // create a transport factory that will invoke our auth callback for
    // digest
    TSaslServerTransport.Factory factory = new TSaslServerTransport.Factory();
    factory.addServerDefinition(DIGEST, AuthUtils.SERVICE, "localhost",
            null, serer_callback_handler);

    LOG.info("SASL DIGEST-MD5 transport factory will be used");
    return factory;
}
项目:learn_jstorm    文件:DigestSaslTransportPlugin.java   
protected TTransportFactory getServerTransportFactory() throws IOException {
    // create an authentication callback handler
    CallbackHandler serer_callback_handler = new ServerCallbackHandler(
            login_conf);

    // create a transport factory that will invoke our auth callback for
    // digest
    TSaslServerTransport.Factory factory = new TSaslServerTransport.Factory();
    factory.addServerDefinition(DIGEST, AuthUtils.SERVICE, "localhost",
            null, serer_callback_handler);

    LOG.info("SASL DIGEST-MD5 transport factory will be used");
    return factory;
}
项目:Tstream    文件:DigestSaslTransportPlugin.java   
protected TTransportFactory getServerTransportFactory() throws IOException {
    // create an authentication callback handler
    CallbackHandler serer_callback_handler = new ServerCallbackHandler(
            login_conf);

    // create a transport factory that will invoke our auth callback for
    // digest
    TSaslServerTransport.Factory factory = new TSaslServerTransport.Factory();
    factory.addServerDefinition(DIGEST, AuthUtils.SERVICE, "localhost",
            null, serer_callback_handler);

    LOG.info("SASL DIGEST-MD5 transport factory will be used");
    return factory;
}
项目:jstorm-0.9.6.3-    文件:SaslTransportPlugin.java   
/**
 * All subclass must implement this method
 * 
 * @return
 * @throws IOException
 */
protected abstract TTransportFactory getServerTransportFactory()
        throws IOException;
项目:learn_jstorm    文件:SaslTransportPlugin.java   
/**
 * All subclass must implement this method
 * 
 * @return
 * @throws IOException
 */
protected abstract TTransportFactory getServerTransportFactory()
        throws IOException;
项目:Tstream    文件:SaslTransportPlugin.java   
/**
 * All subclass must implement this method
 * 
 * @return
 * @throws IOException
 */
protected abstract TTransportFactory getServerTransportFactory()
        throws IOException;