Package org.jboss.metadata.web.spec

Examples of org.jboss.metadata.web.spec.ListenerMetaData


   {
      WebListener annotation = finder.getAnnotation(type, WebListener.class);
      if(annotation == null)
         return;

      ListenerMetaData listenerMetaData = create(type);
      if (metaData.getListeners() == null)
      {
         List<ListenerMetaData> listeners = new ArrayList<ListenerMetaData>();
         listeners.add(listenerMetaData);
         metaData.setListeners(listeners);
View Full Code Here


    private static final Logger log = Logger.getLogger("org.jboss.as.weld");

    public WebIntegrationProcessor() {

        // create wbl listener
        WBL = new ListenerMetaData();
        WBL.setListenerClass("org.jboss.weld.servlet.WeldListener");
        JIL = new ListenerMetaData();
        JIL.setListenerClass("org.jboss.as.weld.webtier.jsp.JspInitializationListener");
        CPF = new FilterMetaData();
        CPF.setFilterName("Weld Conversation Propagation Filter");
        CPF.setFilterClass("org.jboss.weld.servlet.ConversationPropagationFilter");
        CPFM = new FilterMappingMetaData();
View Full Code Here

        // @WebListener
        final List<AnnotationInstance> webListenerAnnotations = index.getAnnotations(webListener);
        if (webListenerAnnotations != null && webListenerAnnotations.size() > 0) {
            List<ListenerMetaData> listeners = new ArrayList<ListenerMetaData>();
            for (final AnnotationInstance annotation : webListenerAnnotations) {
                ListenerMetaData listener = new ListenerMetaData();
                AnnotationTarget target = annotation.target();
                if (!(target instanceof ClassInfo)) {
                    throw new DeploymentUnitProcessingException(MESSAGES.invalidWebListenerAnnotation(target));
                }
                ClassInfo classInfo = ClassInfo.class.cast(target);
                listener.setListenerClass(classInfo.toString());
                AnnotationValue descriptionValue = annotation.value();
                if (descriptionValue != null) {
                    DescriptionGroupMetaData descriptionGroup = getDescriptionGroup(descriptionValue.asString());
                    if (descriptionGroup != null) {
                        listener.setDescriptionGroup(descriptionGroup);
                    }
                }
                listeners.add(listener);
            }
            metaData.setListeners(listeners);
View Full Code Here

    public static final String DISABLE_CDI_INTEGRATION_PARAM = "org.gatein.cdi.DISABLE_CDI_INTEGRATION";

    private final ListenerMetaData cdiListener;

    public PortletBridgeDependencyProcessor() {
        cdiListener = new ListenerMetaData();
        cdiListener.setListenerClass(PBR_LISTENER);
    }
View Full Code Here

        } else {
            //if the portlet bridge listener is present remove it
            //this should allow wars to be portable between AS7 and servlet containers
            final ListIterator<ListenerMetaData> iterator = listeners.listIterator();
            while (iterator.hasNext()) {
                final ListenerMetaData listener = iterator.next();
                if (listener.getListenerClass().trim().equals(PBR_LISTENER)) {
                    log.debugf("Removing portlet bridge listener %s from web config, as it is not needed in EE6 environments", PBR_LISTENER);
                    iterator.remove();
                    break;
                }
            }
View Full Code Here

    private static final String CDI_LISTENER = CDIServletListener.class.getName();

    private final ListenerMetaData cdiListener;

    public CdiWebIntegrationProcessor() {
        cdiListener = new ListenerMetaData();
        cdiListener.setListenerClass(CDI_LISTENER);
    }
View Full Code Here

        } else {
            //if the cdi servlet listener is present remove it
            //this should allow wars to be portable between AS7 and servlet containers
            final ListIterator<ListenerMetaData> iterator = listeners.listIterator();
            while (iterator.hasNext()) {
                final ListenerMetaData listener = iterator.next();
                if (listener.getListenerClass().trim().equals(CDI_LISTENER)) {
                    log.debugf("Removing cdi servlet listener %s from web config, as it is not needed in EE6 environments", CDI_LISTENER);
                    iterator.remove();
                    break;
                }
            }
View Full Code Here

        // @WebListener
        final List<AnnotationInstance> webListenerAnnotations = index.getAnnotations(webListener);
        if (webListenerAnnotations != null && webListenerAnnotations.size() > 0) {
            List<ListenerMetaData> listeners = new ArrayList<ListenerMetaData>();
            for (final AnnotationInstance annotation : webListenerAnnotations) {
                ListenerMetaData listener = new ListenerMetaData();
                AnnotationTarget target = annotation.target();
                if (!(target instanceof ClassInfo)) {
                    throw new DeploymentUnitProcessingException(MESSAGES.invalidWebListenerAnnotation(target));
                }
                ClassInfo classInfo = ClassInfo.class.cast(target);
                listener.setListenerClass(classInfo.toString());
                AnnotationValue descriptionValue = annotation.value();
                if (descriptionValue != null) {
                    DescriptionGroupMetaData descriptionGroup = getDescriptionGroup(descriptionValue.asString());
                    if (descriptionGroup != null) {
                        listener.setDescriptionGroup(descriptionGroup);
                    }
                }
                listeners.add(listener);
            }
            metaData.setListeners(listeners);
View Full Code Here

    private static final String WELD_SERVLET_LISTENER = "org.jboss.weld.environment.servlet.Listener";

    public WebIntegrationProcessor() {

        // create wbl listener
        WBL = new ListenerMetaData();
        WBL.setListenerClass(WELD_LISTENER);
        JIL = new ListenerMetaData();
        JIL.setListenerClass(JSP_LISTENER);
    }
View Full Code Here

        } else {
            //if the weld servlet listener is present remove it
            //this should allow wars to be portable between AS7 and servlet containers
            final ListIterator<ListenerMetaData> iterator = listeners.listIterator();
            while (iterator.hasNext()) {
                final ListenerMetaData listener = iterator.next();
                if (listener.getListenerClass().trim().equals(WELD_SERVLET_LISTENER)) {
                    WeldLogger.DEPLOYMENT_LOGGER.debugf("Removing weld servlet listener %s from web config, as it is not needed in EE6 environments", WELD_SERVLET_LISTENER);
                    iterator.remove();
                    break;
                }
            }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.spec.ListenerMetaData

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.