Package com.foreach.across.core.annotations

Examples of com.foreach.across.core.annotations.EventName


* it will not be handled.  If the handler does not define an EventName, the message can be handled.
*/
public class EventNameFilter implements IMessageFilter<AcrossEvent>
{
  public boolean accepts( AcrossEvent message, MessageHandler metadata ) {
    EventName methodAnnotation = findEventNameAnnotation( metadata );

    if ( methodAnnotation == null ) {
      return true;
    }

    if ( message instanceof NamedAcrossEvent ) {
      String eventName = ( (NamedAcrossEvent) message ).getEventName();
      String[] acceptable = methodAnnotation.value();

      return ArrayUtils.contains( acceptable, eventName );
    }

    // Event name is declared but event is not named, refuse it
View Full Code Here

TOP

Related Classes of com.foreach.across.core.annotations.EventName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.