Package com.facebook.swift.service

Examples of com.facebook.swift.service.ThriftServiceProcessor


    @Test
    public void testGenericProcessor()
            throws ExecutionException, InterruptedException
    {
        ThriftCodecManager codecManager = new ThriftCodecManager();
        ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, ImmutableList.<ThriftEventHandler>of(), new GenericService());

        try (ThriftServer server = new ThriftServer(processor, new ThriftServerConfig()).start();
             ThriftClientManager clientManager = new ThriftClientManager(codecManager)) {
            ThriftClient<GenericInterface.Client> clientOpener = new ThriftClient<>(clientManager, GenericInterface.Client.class);
            try (GenericInterface.Client client = clientOpener.open(new FramedClientConnector(HostAndPort.fromParts("localhost", server.getPort()))).get()) {
View Full Code Here


  public TClientProxyProtocolServer(ClientProxyCommons commons, ClientProxyService proxyService) {
    this.proxyService = proxyService;
    ThriftCodecManager codecManager = new ThriftCodecManager();
    ThriftEventHandler eventHandler = new ThriftEventHandler();
    ThriftServiceProcessor processor = new ThriftServiceProcessor(codecManager, Arrays.asList(
        eventHandler), this);
    server = new ThriftServer(processor, getServerConfig(commons.conf)).start();
  }
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.