Package org.asmatron.messengine.annotations

Examples of org.asmatron.messengine.annotations.MessageListenerClass


  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  public int setupMessEngine(Object object) {
    int count = 0;
    MessageListenerClass selector = AnnotationUtils.findAnnotation(object.getClass(), MessageListenerClass.class);
    if (selector != null && object instanceof MessageListener) {
      MessageListener listener = (MessageListener) object;
      messEngine.addMessageListener(selector.value(), listener);
      count++;
    }
    List<Method> messageMethods = getMethods(object.getClass(), MessageMethod.class);
    if (messageMethods.size() == 0) {
      return count;
View Full Code Here


  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  public int resetMessEngine(Object object) {
    int count = 0;
    MessageListenerClass selector = AnnotationUtils.findAnnotation(object.getClass(), MessageListenerClass.class);
    if (selector != null && object instanceof MessageListener) {
      MessageListener listener = (MessageListener) object;
      messEngine.removeMessageListener(selector.value(), listener);
      count++;
    }
    List<Method> messageMethods = getMethods(object.getClass(), MessageMethod.class);
    if (messageMethods.size() == 0) {
      return count;
View Full Code Here

TOP

Related Classes of org.asmatron.messengine.annotations.MessageListenerClass

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.