Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.hivemind.service.impl
Class EventLinkerImpl  view EventLinkerImpl download EventLinkerImpl.java

java.lang.Object
  extended byorg.apache.hivemind.impl.BaseLocatable
      extended byorg.apache.hivemind.service.impl.EventLinkerImpl
All Implemented Interfaces:
org.apache.hivemind.service.EventLinker, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder

public class EventLinkerImpl
extends org.apache.hivemind.impl.BaseLocatable
implements org.apache.hivemind.service.EventLinker

Implementation of org.apache.hivemind.service.EventLinker. Will output warnings whenever a consumer can't be registered for at least one event set (which can happen when the consumer does not implement the necessary interfaces).


Field Summary
private  org.apache.hivemind.ErrorLog _errorLog
           
private  java.util.Map _producerEventSets
          Map of java.beans.EventSetDescriptor[], keyed on producer class.
 
Fields inherited from class org.apache.hivemind.impl.BaseLocatable
 
Constructor Summary
EventLinkerImpl(org.apache.hivemind.ErrorLog errorLog)
           
 
Method Summary
private  void addEventListener(java.lang.Object producer, java.beans.EventSetDescriptor set, java.lang.Object consumer, org.apache.hivemind.Location location)
           
 void addEventListener(java.lang.Object producer, java.lang.String eventSetName, java.lang.Object consumer, org.apache.hivemind.Location location)
          Adds the consumer as a listener of events published by the producer.
private  java.beans.EventSetDescriptor[] findEventSets(java.lang.Class producerClass)
           
private  java.beans.EventSetDescriptor[] getEventSets(java.lang.Class producerClass)
           
private  java.beans.EventSetDescriptor[] getEventSets(java.lang.Object producer)
           
private  boolean isAssignable(java.beans.EventSetDescriptor set, java.lang.Class consumerClass)
           
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_errorLog

private org.apache.hivemind.ErrorLog _errorLog

_producerEventSets

private java.util.Map _producerEventSets
Map of java.beans.EventSetDescriptor[], keyed on producer class.

Constructor Detail

EventLinkerImpl

public EventLinkerImpl(org.apache.hivemind.ErrorLog errorLog)
Method Detail

addEventListener

public void addEventListener(java.lang.Object producer,
                             java.lang.String eventSetName,
                             java.lang.Object consumer,
                             org.apache.hivemind.Location location)
Description copied from interface: org.apache.hivemind.service.EventLinker
Adds the consumer as a listener of events published by the producer. Typically, the producer is a service, and the consumer is some other service's core implementation.

Specified by:
addEventListener in interface org.apache.hivemind.service.EventLinker

isAssignable

private boolean isAssignable(java.beans.EventSetDescriptor set,
                             java.lang.Class consumerClass)

addEventListener

private void addEventListener(java.lang.Object producer,
                              java.beans.EventSetDescriptor set,
                              java.lang.Object consumer,
                              org.apache.hivemind.Location location)

getEventSets

private java.beans.EventSetDescriptor[] getEventSets(java.lang.Object producer)

getEventSets

private java.beans.EventSetDescriptor[] getEventSets(java.lang.Class producerClass)

findEventSets

private java.beans.EventSetDescriptor[] findEventSets(java.lang.Class producerClass)