Package com.facebook.swift.service

Examples of com.facebook.swift.service.ThriftServiceProcessor


    public void tearDownSuite() {
    }

    private ThriftServer createServer(ServiceInterface handler)
            throws IllegalAccessException, InstantiationException {
        ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, ImmutableList.<ThriftEventHandler>of(), handler);
        return new ThriftServer(processor, serverConfig);
    }
View Full Code Here


            return server;
        }

        public ServerCreator invoke()
        {
            ThriftServiceProcessor processor = new ThriftServiceProcessor(
                    new ThriftCodecManager(),
                    ImmutableList.<ThriftEventHandler>of(),
                    new SimpleService()
            );
View Full Code Here

    public void tearDownSuite() {
    }

    private ThriftServer createServer(ServiceInterface handler)
            throws IllegalAccessException, InstantiationException {
        ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, handler);
        return new ThriftServer(processor);
    }
View Full Code Here

    public void testPumaSwift()
            throws Exception
    {
        // create server and start
        PumaReadServer puma = new PumaReadServer();
        ThriftServiceProcessor processor = new ThriftServiceProcessor(new ThriftCodecManager(), puma);

        // create server and client
        try (
                ThriftServer server = new ThriftServer(processor).start();
                ThriftClientManager clientManager = new ThriftClientManager();
View Full Code Here

    {
        PumaReadServer puma = new PumaReadServer();
        ReadSemanticException exception = new ReadSemanticException("my exception");
        puma.setException(exception);

        TProcessor processor = new ThriftServiceProcessor(new ThriftCodecManager(), puma);
        try (
                ThriftServer server = new ThriftServer(processor).start();
                ThriftClientManager clientManager = new ThriftClientManager();
                PumaReadService pumaClient = clientManager.createClient(
                        new FramedClientConnector(HostAndPort.fromParts("localhost", server.getPort())),
View Full Code Here

    }

    protected ThriftServer createServerFromHandler(Object handler)
            throws IllegalAccessException, InstantiationException
    {
        ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, handler);
        ThriftServerConfig config = new ThriftServerConfig();
        config.setMaxFrameSize(new DataSize(MAX_FRAME_SIZE, DataSize.Unit.BYTE));

        return new ThriftServer(processor, config).start();
    }
View Full Code Here

    }

    protected ThriftServer createServerFromHandler(Object handler)
            throws IllegalAccessException, InstantiationException
    {
        ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, handler);
        ThriftServerConfig config = new ThriftServerConfig();
        config.setMaxFrameSize(new DataSize(MAX_FRAME_SIZE, DataSize.Unit.BYTE));

        return new ThriftServer(processor, config).start();
    }
View Full Code Here

                                                     optionsSource,
                                                     sourceSetBuilder.build());

        ExampleServiceHandler exampleServiceHandler = new ExampleServiceHandler();

        ThriftServiceProcessor processor =
          new ThriftServiceProcessor(codecManager,
                                     ImmutableList.<ThriftEventHandler>of(),
                                     exampleServiceHandler,
                                     fb303Handler);
        final ThriftServer server =
                new ThriftServer(
View Full Code Here

    public void testPumaSwift()
            throws Exception
    {
        // create server and start
        PumaReadServer puma = new PumaReadServer();
        ThriftServiceProcessor processor = new ThriftServiceProcessor(new ThriftCodecManager(), ImmutableList.<ThriftEventHandler>of(), puma);

        // create server and client
        try (
                ThriftServer server = new ThriftServer(processor).start();
                ThriftClientManager clientManager = new ThriftClientManager();
View Full Code Here

    {
        PumaReadServer puma = new PumaReadServer();
        ReadSemanticException exception = new ReadSemanticException("my exception");
        puma.setException(exception);

        NiftyProcessor processor = new ThriftServiceProcessor(new ThriftCodecManager(), ImmutableList.<ThriftEventHandler>of(), puma);
        try (
                ThriftServer server = new ThriftServer(processor).start();
                ThriftClientManager clientManager = new ThriftClientManager();
                PumaReadService pumaClient = clientManager.createClient(
                        new FramedClientConnector(HostAndPort.fromParts("localhost", server.getPort())),
View Full Code Here

TOP

Related Classes of com.facebook.swift.service.ThriftServiceProcessor

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.