com.alibaba.dubbo.rpc.protocol.thrift.ext.MultiServiceProcessor Java Examples
The following examples show how to use
com.alibaba.dubbo.rpc.protocol.thrift.ext.MultiServiceProcessor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractTest.java From dubbo-2.6.5 with Apache License 2.0 | 5 votes |
protected TProcessor getProcessor() { MultiServiceProcessor result = new MultiServiceProcessor(); result.addProcessor( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class, new $__DemoStub.Processor(getServiceImpl())); return result; }
Example #2
Source File: AbstractTest.java From dubbox with Apache License 2.0 | 5 votes |
protected TProcessor getProcessor() { MultiServiceProcessor result = new MultiServiceProcessor(); result.addProcessor( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class, new $__DemoStub.Processor( getServiceImpl() ) ); return result; }
Example #3
Source File: AbstractTest.java From dubbox-hystrix with Apache License 2.0 | 5 votes |
protected TProcessor getProcessor() { MultiServiceProcessor result = new MultiServiceProcessor(); result.addProcessor( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class, new $__DemoStub.Processor( getServiceImpl() ) ); return result; }
Example #4
Source File: AbstractTest.java From dubbox with Apache License 2.0 | 5 votes |
protected TProcessor getProcessor() { MultiServiceProcessor result = new MultiServiceProcessor(); result.addProcessor( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class, new $__DemoStub.Processor( getServiceImpl() ) ); return result; }
Example #5
Source File: AbstractTest.java From dubbox with Apache License 2.0 | 5 votes |
protected TProcessor getProcessor() { MultiServiceProcessor result = new MultiServiceProcessor(); result.addProcessor( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class, new $__DemoStub.Processor( getServiceImpl() ) ); return result; }
Example #6
Source File: ServiceMethodNotFoundTest.java From dubbo-2.6.5 with Apache License 2.0 | 2 votes |
protected void init() throws Exception { TServerTransport serverTransport = new TServerSocket(PORT); DubboDemoImpl impl = new DubboDemoImpl(); $__DemoStub.Processor processor = new $__DemoStub.Processor(impl); // for test Field field = processor.getClass().getSuperclass().getDeclaredField("processMap"); field.setAccessible(true); Object obj = field.get(processor); if (obj instanceof Map) { ((Map) obj).remove("echoString"); } // ~ TBinaryProtocol.Factory bFactory = new TBinaryProtocol.Factory(); MultiServiceProcessor wrapper = new MultiServiceProcessor(); wrapper.addProcessor(Demo.class, processor); server = new TThreadPoolServer( new TThreadPoolServer.Args(serverTransport) .inputProtocolFactory(bFactory) .outputProtocolFactory(bFactory) .inputTransportFactory(getTransportFactory()) .outputTransportFactory(getTransportFactory()) .processor(wrapper)); Thread startTread = new Thread() { @Override public void run() { server.serve(); } }; startTread.start(); while (!server.isServing()) { Thread.sleep(100); } }
Example #7
Source File: ServiceMethodNotFoundTest.java From dubbox with Apache License 2.0 | 2 votes |
protected void init() throws Exception { TServerTransport serverTransport = new TServerSocket( PORT ); DubboDemoImpl impl = new DubboDemoImpl(); $__DemoStub.Processor processor = new $__DemoStub.Processor( impl ); // for test Field field = processor.getClass().getSuperclass().getDeclaredField( "processMap" ); field.setAccessible( true ); Object obj = field.get( processor ); if ( obj instanceof Map ) { ( ( Map ) obj ).remove( "echoString" ); } // ~ TBinaryProtocol.Factory bFactory = new TBinaryProtocol.Factory(); MultiServiceProcessor wrapper = new MultiServiceProcessor(); wrapper.addProcessor( Demo.class, processor ); server = new TThreadPoolServer( new TThreadPoolServer.Args( serverTransport ) .inputProtocolFactory( bFactory ) .outputProtocolFactory( bFactory ) .inputTransportFactory( getTransportFactory() ) .outputTransportFactory( getTransportFactory() ) .processor( wrapper ) ); Thread startTread = new Thread() { @Override public void run() { server.serve(); } }; startTread.start(); while ( !server.isServing() ) { Thread.sleep( 100 ); } }
Example #8
Source File: ServiceMethodNotFoundTest.java From dubbox-hystrix with Apache License 2.0 | 2 votes |
protected void init() throws Exception { TServerTransport serverTransport = new TServerSocket( PORT ); DubboDemoImpl impl = new DubboDemoImpl(); $__DemoStub.Processor processor = new $__DemoStub.Processor( impl ); // for test Field field = processor.getClass().getSuperclass().getDeclaredField( "processMap" ); field.setAccessible( true ); Object obj = field.get( processor ); if ( obj instanceof Map ) { ( ( Map ) obj ).remove( "echoString" ); } // ~ TBinaryProtocol.Factory bFactory = new TBinaryProtocol.Factory(); MultiServiceProcessor wrapper = new MultiServiceProcessor(); wrapper.addProcessor( Demo.class, processor ); server = new TThreadPoolServer( new TThreadPoolServer.Args( serverTransport ) .inputProtocolFactory( bFactory ) .outputProtocolFactory( bFactory ) .inputTransportFactory( getTransportFactory() ) .outputTransportFactory( getTransportFactory() ) .processor( wrapper ) ); Thread startTread = new Thread() { @Override public void run() { server.serve(); } }; startTread.start(); while ( !server.isServing() ) { Thread.sleep( 100 ); } }
Example #9
Source File: ServiceMethodNotFoundTest.java From dubbox with Apache License 2.0 | 2 votes |
protected void init() throws Exception { TServerTransport serverTransport = new TServerSocket( PORT ); DubboDemoImpl impl = new DubboDemoImpl(); $__DemoStub.Processor processor = new $__DemoStub.Processor( impl ); // for test Field field = processor.getClass().getSuperclass().getDeclaredField( "processMap" ); field.setAccessible( true ); Object obj = field.get( processor ); if ( obj instanceof Map ) { ( ( Map ) obj ).remove( "echoString" ); } // ~ TBinaryProtocol.Factory bFactory = new TBinaryProtocol.Factory(); MultiServiceProcessor wrapper = new MultiServiceProcessor(); wrapper.addProcessor( Demo.class, processor ); server = new TThreadPoolServer( new TThreadPoolServer.Args( serverTransport ) .inputProtocolFactory( bFactory ) .outputProtocolFactory( bFactory ) .inputTransportFactory( getTransportFactory() ) .outputTransportFactory( getTransportFactory() ) .processor( wrapper ) ); Thread startTread = new Thread() { @Override public void run() { server.serve(); } }; startTread.start(); while ( !server.isServing() ) { Thread.sleep( 100 ); } }
Example #10
Source File: ServiceMethodNotFoundTest.java From dubbox with Apache License 2.0 | 2 votes |
protected void init() throws Exception { TServerTransport serverTransport = new TServerSocket( PORT ); DubboDemoImpl impl = new DubboDemoImpl(); $__DemoStub.Processor processor = new $__DemoStub.Processor( impl ); // for test Field field = processor.getClass().getSuperclass().getDeclaredField( "processMap" ); field.setAccessible( true ); Object obj = field.get( processor ); if ( obj instanceof Map ) { ( ( Map ) obj ).remove( "echoString" ); } // ~ TBinaryProtocol.Factory bFactory = new TBinaryProtocol.Factory(); MultiServiceProcessor wrapper = new MultiServiceProcessor(); wrapper.addProcessor( Demo.class, processor ); server = new TThreadPoolServer( new TThreadPoolServer.Args( serverTransport ) .inputProtocolFactory( bFactory ) .outputProtocolFactory( bFactory ) .inputTransportFactory( getTransportFactory() ) .outputTransportFactory( getTransportFactory() ) .processor( wrapper ) ); Thread startTread = new Thread() { @Override public void run() { server.serve(); } }; startTread.start(); while ( !server.isServing() ) { Thread.sleep( 100 ); } }