Author: nickarls
Date: 2010-03-23 04:54:49 -0400 (Tue, 23 Mar 2010)
New Revision: 12247
Removed:
modules/servlet/trunk/src/test/java/org/jboss/seam/faces/event/
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/HttpManager.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/ServletListener.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Complete.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java
Log:
javadocs + comments
HttpManager tunings (under construction, no tests yet)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/HttpManager.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/HttpManager.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/HttpManager.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -1,40 +1,121 @@
package org.jboss.seam.servlet.event;
-import javax.enterprise.context.RequestScoped;
+import javax.enterprise.context.SessionScoped;
import javax.enterprise.event.Observes;
-import javax.servlet.ServletContext;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletRequestEvent;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionEvent;
+import org.jboss.seam.servlet.event.qualifier.AttributeAdded;
+import org.jboss.seam.servlet.event.qualifier.AttributeRemoved;
+import org.jboss.seam.servlet.event.qualifier.AttributeReplaced;
+import org.jboss.seam.servlet.event.qualifier.Created;
+import org.jboss.seam.servlet.event.qualifier.Destroyed;
import org.jboss.seam.servlet.event.qualifier.Initialized;
-@RequestScoped
+/**
+ * A manager for acquiring HTTP artifacts
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+@SessionScoped
public class HttpManager
{
private HttpSession session;
private HttpServletRequest request;
- private ServletContext context;
+ private BeanManager beanManager;
- public void refresh(@Observes @Initialized ServletRequestEvent e)
+ protected void requestInitialized(@Observes @Initialized ServletRequestEvent e)
{
- this.request = (HttpServletRequest) e.getServletRequest();
- session = request.getSession();
- context = session.getServletContext();
+ request = (HttpServletRequest) e.getServletRequest();
}
+ protected void requestDestroyed(@Observes @Destroyed ServletRequestEvent e)
+ {
+ request = null;
+ }
+
+ protected void servletContextAttributeAdded(@Observes @AttributeAdded
ServletContextAttributeEvent e)
+ {
+ if (BeanManager.class.getName().equals(e.getName()))
+ {
+ beanManager = (BeanManager) e.getValue();
+ }
+ }
+
+ protected void servletContextAttributeReplaced(@Observes @AttributeReplaced
ServletContextAttributeEvent e)
+ {
+ if (BeanManager.class.getName().equals(e.getName()))
+ {
+ beanManager = (BeanManager) e.getValue();
+ }
+ }
+
+ protected void servletContextAttributeRemoved(@Observes @AttributeRemoved
ServletContextAttributeEvent e)
+ {
+ if (BeanManager.class.getName().equals(e.getName()))
+ {
+ beanManager = null;
+ }
+ }
+
+ protected void sessionInitialized(@Observes @Created HttpSessionEvent e)
+ {
+ session = e.getSession();
+ }
+
+ protected void sessionDestroyed(@Observes @Destroyed HttpSessionEvent e)
+ {
+ session = null;
+ }
+
+ /**
+ * Returns the current HTTP session. Throws an {@link IllegalStateException}
+ * if the session is currently not set.
+ *
+ * @return The current HTTP session
+ */
public HttpSession getSession()
{
+ if (session == null)
+ {
+ throw new IllegalStateException("The HTTP session is currently not
set");
+ }
return session;
}
+ /**
+ * Returns the current HTTP request. Throws an {@link IllegalStateException}
+ * if the request is currently not set.
+ *
+ * @return The current HTTP request
+ */
public HttpServletRequest getRequest()
{
+ if (request == null)
+ {
+ throw new IllegalStateException("The HTTP request is currently not
set");
+ }
return request;
}
- public ServletContext getContext()
+ /**
+ * Returns the current CDI Bean Manager of the WAR. Throws an
+ * {@link IllegalStateException} if the manager is not set.
+ *
+ * @return The current HTTP request
+ */
+ public BeanManager getBeanManager()
{
- return context;
+ if (beanManager == null)
+ {
+ throw new IllegalStateException("The Bean Manager is currently not
set");
+ }
+ return beanManager;
}
+
}
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/ServletListener.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/ServletListener.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/ServletListener.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -43,7 +43,12 @@
import org.jboss.seam.servlet.event.qualifier.ValueUnbound;
import org.jboss.seam.servlet.event.qualifier.WillPassivate;
-@SuppressWarnings("serial")
+/**
+ * A self-registering web-listener that propagates the events to the current CDI Bean
Manager event queue
+ *
+ * @author Nicklas Karlsson
+ *
+ */
@WebListener
public class ServletListener implements HttpSessionActivationListener,
HttpSessionAttributeListener, HttpSessionBindingListener, HttpSessionListener,
ServletContextListener, ServletContextAttributeListener, ServletRequestListener,
ServletRequestAttributeListener, AsyncListener
{
@@ -53,6 +58,7 @@
// FIXME: hack to work around invalid binding in JBoss AS 6 M2
private static final List<String> beanManagerLocations = new
ArrayList<String>()
{
+ private static final long serialVersionUID = 1L;
{
add("java:comp/BeanManager");
add("java:app/BeanManager");
@@ -90,10 +96,15 @@
beanManager.fireEvent(payload, qualifiers);
}
+ /**
+ * Session activated / passivated events
+ */
+
public void sessionDidActivate(HttpSessionEvent e)
{
fireEvent(e, new AnnotationLiteral<DidActivate>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -101,13 +112,19 @@
{
fireEvent(e, new AnnotationLiteral<WillPassivate>()
{
+ private static final long serialVersionUID = 1L;
});
}
+ /**
+ * Session attribute events
+ */
+
public void attributeAdded(HttpSessionBindingEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeAdded>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -115,6 +132,11 @@
{
fireEvent(e, new AnnotationLiteral<AttributeRemoved>()
{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
});
}
@@ -122,6 +144,7 @@
{
fireEvent(e, new AnnotationLiteral<AttributeReplaced>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -129,6 +152,7 @@
{
fireEvent(e, new AnnotationLiteral<ValueBound>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -136,13 +160,19 @@
{
fireEvent(e, new AnnotationLiteral<ValueUnbound>()
{
+ private static final long serialVersionUID = 1L;
});
}
+ /**
+ * Session created / destroyed events
+ */
+
public void sessionCreated(HttpSessionEvent e)
{
fireEvent(e, new AnnotationLiteral<Created>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -150,13 +180,19 @@
{
fireEvent(e, new AnnotationLiteral<Destroyed>()
{
+ private static final long serialVersionUID = 1L;
});
}
+ /**
+ * Servlet context initialized / destroyed events
+ */
+
public void contextDestroyed(ServletContextEvent e)
{
fireEvent(e, new AnnotationLiteral<Destroyed>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -164,13 +200,19 @@
{
fireEvent(e, new AnnotationLiteral<Initialized>()
{
+ private static final long serialVersionUID = 1L;
});
}
+ /**
+ * Servlet context attribute events
+ */
+
public void attributeAdded(ServletContextAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeAdded>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -178,6 +220,7 @@
{
fireEvent(e, new AnnotationLiteral<AttributeRemoved>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -185,13 +228,19 @@
{
fireEvent(e, new AnnotationLiteral<AttributeReplaced>()
{
+ private static final long serialVersionUID = 1L;
});
}
+ /**
+ * Request created / destroyed events
+ */
+
public void requestDestroyed(ServletRequestEvent e)
{
fireEvent(e, new AnnotationLiteral<Destroyed>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -199,13 +248,19 @@
{
fireEvent(e, new AnnotationLiteral<Initialized>()
{
+ private static final long serialVersionUID = 1L;
});
}
+ /**
+ * Servlet request attribute events
+ */
+
public void attributeAdded(ServletRequestAttributeEvent e)
{
fireEvent(e, new AnnotationLiteral<AttributeAdded>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -213,6 +268,7 @@
{
fireEvent(e, new AnnotationLiteral<AttributeRemoved>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -220,13 +276,19 @@
{
fireEvent(e, new AnnotationLiteral<AttributeReplaced>()
{
+ private static final long serialVersionUID = 1L;
});
}
+ /**
+ * Asynchronous events
+ */
+
public void onComplete(AsyncEvent e) throws IOException
{
fireEvent(e, new AnnotationLiteral<Complete>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -234,6 +296,7 @@
{
fireEvent(e, new AnnotationLiteral<Error>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -241,6 +304,7 @@
{
fireEvent(e, new AnnotationLiteral<StartAsync>()
{
+ private static final long serialVersionUID = 1L;
});
}
@@ -248,6 +312,7 @@
{
fireEvent(e, new AnnotationLiteral<Timeout>()
{
+ private static final long serialVersionUID = 1L;
});
}
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeAdded.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -1,14 +1,30 @@
package org.jboss.seam.servlet.event.qualifier;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
import javax.inject.Qualifier;
+import javax.servlet.ServletContextAttributeEvent;
+import javax.servlet.ServletRequestAttributeEvent;
+import javax.servlet.http.HttpSessionBindingEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * attributes being added.
+ *
+ * The event parameter can be a {@link HttpSessionBindingEvent},
+ * {@link ServletContextAttributeEvent} or a
+ * {@link ServletRequestAttributeEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
-@Target({FIELD, PARAMETER})
+@Target( { FIELD, PARAMETER })
@Retention(RUNTIME)
-public @interface AttributeAdded {}
\ No newline at end of file
+public @interface AttributeAdded
+{
+}
\ No newline at end of file
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeRemoved.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -7,7 +7,20 @@
import static java.lang.annotation.ElementType.PARAMETER;
import javax.inject.Qualifier;
+import javax.servlet.ServletContextAttributeEvent;
+import javax.servlet.ServletRequestAttributeEvent;
+import javax.servlet.http.HttpSessionBindingEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * attributes being removed.
+ *
+ * The event parameter can be a {@link HttpSessionBindingEvent},
+ * {@link ServletContextAttributeEvent} or a
+ * {@link ServletRequestAttributeEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/AttributeReplaced.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -7,7 +7,20 @@
import static java.lang.annotation.ElementType.PARAMETER;
import javax.inject.Qualifier;
+import javax.servlet.ServletContextAttributeEvent;
+import javax.servlet.ServletRequestAttributeEvent;
+import javax.servlet.http.HttpSessionBindingEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * attributes being replaced.
+ *
+ * The event parameter can be a {@link HttpSessionBindingEvent},
+ * {@link ServletContextAttributeEvent} or a
+ * {@link ServletRequestAttributeEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Complete.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Complete.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Complete.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -1,14 +1,26 @@
package org.jboss.seam.servlet.event.qualifier;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * asynchronous request are completed.
+ *
+ * The event parameter is an {@link AsyncEvent}
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
-@Target({FIELD, PARAMETER})
+@Target( { FIELD, PARAMETER })
@Retention(RUNTIME)
-public @interface Complete {}
\ No newline at end of file
+public @interface Complete
+{
+}
\ No newline at end of file
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Created.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -1,13 +1,23 @@
package org.jboss.seam.servlet.event.qualifier;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * HTTP sessions are created.
+ *
+ * The event parameter is an {@link HttpSessionEvent}
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Destroyed.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -1,13 +1,27 @@
package org.jboss.seam.servlet.event.qualifier;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
import javax.inject.Qualifier;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpSessionEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * HTTP artifacts are being destroyed.
+ *
+ * The event parameter can be a {@link ServletContextEvent},
+ * {@link ServletRequestEvent} or a
+ * {@link HttpSessionEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/DidActivate.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -7,7 +7,16 @@
import static java.lang.annotation.ElementType.PARAMETER;
import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * HTTP sessions are activated.
+ *
+ * The event parameter is an {@link HttpSessionEvent}
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Error.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -8,7 +8,16 @@
import java.lang.annotation.Target;
import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+/**
+ * Qualifies observer method parameters to select events that involve
+ * asynchronous request failing.
+ *
+ * The event parameter is an {@link AsyncEvent},
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Initialized.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -1,14 +1,28 @@
package org.jboss.seam.servlet.event.qualifier;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
import javax.inject.Qualifier;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when HTTP
+ * artifacts are being initialized.
+ *
+ * The event parameter can be a {@link ServletContextEvent} or a
+ * {@link ServletRequestEvent}.
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
-@Target({FIELD, PARAMETER})
+@Target( { FIELD, PARAMETER })
@Retention(RUNTIME)
-public @interface Initialized {}
\ No newline at end of file
+public @interface Initialized
+{
+}
\ No newline at end of file
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/StartAsync.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -7,7 +7,16 @@
import static java.lang.annotation.ElementType.PARAMETER;
import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+/**
+ * Qualifies observer method parameters to select events that involve
+ * asynchronous request starting.
+ *
+ * The event parameter is an {@link AsyncEvent},
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/Timeout.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -7,7 +7,16 @@
import static java.lang.annotation.ElementType.PARAMETER;
import javax.inject.Qualifier;
+import javax.servlet.AsyncEvent;
+/**
+ * Qualifies observer method parameters to select events that involve
+ * asynchronous request timing out.
+ *
+ * The event parameter is an {@link AsyncEvent},
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueBound.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -1,13 +1,23 @@
package org.jboss.seam.servlet.event.qualifier;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionBindingEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * values are being bound to the HTTP session.
+ *
+ * The event parameter is a {@link HttpSessionBindingEvent}
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/ValueUnbound.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -7,7 +7,16 @@
import static java.lang.annotation.ElementType.PARAMETER;
import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionBindingEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * values are being unbound from the HTTP session.
+ *
+ * The event parameter is a {@link HttpSessionBindingEvent}
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
Modified:
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java
===================================================================
---
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java 2010-03-23
07:59:23 UTC (rev 12246)
+++
modules/servlet/trunk/src/main/java/org/jboss/seam/servlet/event/qualifier/WillPassivate.java 2010-03-23
08:54:49 UTC (rev 12247)
@@ -7,7 +7,16 @@
import static java.lang.annotation.ElementType.PARAMETER;
import javax.inject.Qualifier;
+import javax.servlet.http.HttpSessionEvent;
+/**
+ * Qualifies observer method parameters to select events that fire when
+ * HTTP sessions are passivated.
+ *
+ * The event parameter is an {@link HttpSessionEvent}
+ *
+ * @author Nicklas Karlsson
+ */
@Qualifier
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)