@SuppressWarnings("deprecation")
private static TransportDispatcher createDispatcher()
{
return new TransportDispatcherBuilder()
.addRpcHandler(ECHO_URI, new RpcEchoServer(new EchoServiceImpl()))
.addRpcHandler(ON_EXCEPTION_ECHO_URI, new RpcEchoServer(new OnExceptionEchoService()))
.addRpcHandler(THROWING_ECHO_URI, new RpcEchoServer(new ThrowingEchoService()))
.addRestHandler(ECHO_URI, new RestEchoServer(new EchoServiceImpl()))
.addRestHandler(ON_EXCEPTION_ECHO_URI, new RestEchoServer(new OnExceptionEchoService()))
.addRestHandler(THROWING_ECHO_URI, new RestEchoServer(new ThrowingEchoService()))
.build();
}