Search in sources :

Example 1 with ReflectResponder

use of org.apache.avro.ipc.reflect.ReflectResponder in project camel by apache.

the class AvroNettyProducerTest method initializeServer.

@Override
protected void initializeServer() {
    if (server == null) {
        server = new NettyServer(new SpecificResponder(KeyValueProtocol.PROTOCOL, keyValue), new InetSocketAddress("localhost", avroPort));
        server.start();
    }
    if (serverReflection == null) {
        serverReflection = new NettyServer(new ReflectResponder(TestReflection.class, testReflection), new InetSocketAddress("localhost", avroPortReflection));
        serverReflection.start();
    }
}
Also used : SpecificResponder(org.apache.avro.ipc.specific.SpecificResponder) InetSocketAddress(java.net.InetSocketAddress) NettyServer(org.apache.avro.ipc.NettyServer) ReflectResponder(org.apache.avro.ipc.reflect.ReflectResponder)

Example 2 with ReflectResponder

use of org.apache.avro.ipc.reflect.ReflectResponder in project camel by apache.

the class AvroHttpProducerTest method initializeServer.

@Override
protected void initializeServer() throws IOException {
    if (server == null) {
        server = new HttpServer(new SpecificResponder(KeyValueProtocol.PROTOCOL, keyValue), avroPort);
        server.start();
    }
    if (serverReflection == null) {
        serverReflection = new HttpServer(new ReflectResponder(TestReflection.class, testReflection), avroPortReflection);
        serverReflection.start();
    }
}
Also used : SpecificResponder(org.apache.avro.ipc.specific.SpecificResponder) HttpServer(org.apache.avro.ipc.HttpServer) ReflectResponder(org.apache.avro.ipc.reflect.ReflectResponder)

Aggregations

ReflectResponder (org.apache.avro.ipc.reflect.ReflectResponder)2 SpecificResponder (org.apache.avro.ipc.specific.SpecificResponder)2 InetSocketAddress (java.net.InetSocketAddress)1 HttpServer (org.apache.avro.ipc.HttpServer)1 NettyServer (org.apache.avro.ipc.NettyServer)1