org.apache.s4.core
Class Receiver

java.lang.Object
  extended by org.apache.s4.core.Receiver
All Implemented Interfaces:
java.lang.Runnable

public class Receiver
extends java.lang.Object
implements java.lang.Runnable

The Receiver and its counterpart Sender are the top level classes of the communication layer.

Receiver is responsible for receiving an event to a ProcessingElement instance using a hashKey.

A Listener implementation receives data from the network and passes an event as a byte array to the Receiver. The byte array is de-serialized and converted into an Event. Finally the event is passed to the matching streams.

There is a single Receiver instance per node. Details on how the cluster is partitioned and how events are serialized and transmitted to its destination are hidden from the application developer.


Constructor Summary
Receiver(Listener listener, SerializerDeserializer serDeser)
           
 
Method Summary
 void close()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Receiver

@Inject
public Receiver(Listener listener,
                       SerializerDeserializer serDeser)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

close

public void close()