Search in sources :

Example 1 with ReflectRequestor

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

the class AvroHttpConsumerTest method initializeTranceiver.

@Override
protected void initializeTranceiver() throws IOException {
    transceiver = new HttpTransceiver(new URL("http://localhost:" + avroPort));
    requestor = new SpecificRequestor(KeyValueProtocol.class, transceiver);
    transceiverMessageInRoute = new HttpTransceiver(new URL("http://localhost:" + avroPortMessageInRoute));
    requestorMessageInRoute = new SpecificRequestor(KeyValueProtocol.class, transceiverMessageInRoute);
    transceiverForWrongMessages = new HttpTransceiver(new URL("http://localhost:" + avroPortForWrongMessages));
    requestorForWrongMessages = new SpecificRequestor(KeyValueProtocol.class, transceiverForWrongMessages);
    reflectTransceiver = new HttpTransceiver(new URL("http://localhost:" + avroPortReflection));
    reflectRequestor = new ReflectRequestor(TestReflection.class, reflectTransceiver);
}
Also used : SpecificRequestor(org.apache.avro.ipc.specific.SpecificRequestor) HttpTransceiver(org.apache.avro.ipc.HttpTransceiver) ReflectRequestor(org.apache.avro.ipc.reflect.ReflectRequestor) TestReflection(org.apache.camel.avro.test.TestReflection) URL(java.net.URL) KeyValueProtocol(org.apache.camel.avro.generated.KeyValueProtocol)

Example 2 with ReflectRequestor

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

the class AvroNettyConsumerTest method initializeTranceiver.

@Override
protected void initializeTranceiver() throws IOException {
    transceiver = new NettyTransceiver(new InetSocketAddress("localhost", avroPort));
    requestor = new SpecificRequestor(KeyValueProtocol.class, transceiver);
    transceiverMessageInRoute = new NettyTransceiver(new InetSocketAddress("localhost", avroPortMessageInRoute));
    requestorMessageInRoute = new SpecificRequestor(KeyValueProtocol.class, transceiverMessageInRoute);
    transceiverForWrongMessages = new NettyTransceiver(new InetSocketAddress("localhost", avroPortForWrongMessages));
    requestorForWrongMessages = new SpecificRequestor(KeyValueProtocol.class, transceiverForWrongMessages);
    reflectTransceiver = new NettyTransceiver(new InetSocketAddress("localhost", avroPortReflection));
    reflectRequestor = new ReflectRequestor(TestReflection.class, reflectTransceiver);
}
Also used : NettyTransceiver(org.apache.avro.ipc.NettyTransceiver) SpecificRequestor(org.apache.avro.ipc.specific.SpecificRequestor) InetSocketAddress(java.net.InetSocketAddress) ReflectRequestor(org.apache.avro.ipc.reflect.ReflectRequestor) TestReflection(org.apache.camel.avro.test.TestReflection) KeyValueProtocol(org.apache.camel.avro.generated.KeyValueProtocol)

Aggregations

ReflectRequestor (org.apache.avro.ipc.reflect.ReflectRequestor)2 SpecificRequestor (org.apache.avro.ipc.specific.SpecificRequestor)2 KeyValueProtocol (org.apache.camel.avro.generated.KeyValueProtocol)2 TestReflection (org.apache.camel.avro.test.TestReflection)2 InetSocketAddress (java.net.InetSocketAddress)1 URL (java.net.URL)1 HttpTransceiver (org.apache.avro.ipc.HttpTransceiver)1 NettyTransceiver (org.apache.avro.ipc.NettyTransceiver)1