[jboss-cvs] JBossAS SVN: r95844 - projects/interceptors/api/trunk/src/main/java/javax/interceptor.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 30 12:09:28 EDT 2009


Author: marius.bogoevici
Date: 2009-10-30 12:09:28 -0400 (Fri, 30 Oct 2009)
New Revision: 95844

Added:
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundTimeout.java
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptor.java
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/InterceptorBinding.java
Modified:
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundInvoke.java
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeClassInterceptors.java
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeDefaultInterceptors.java
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptors.java
   projects/interceptors/api/trunk/src/main/java/javax/interceptor/InvocationContext.java
Log:
Version 1.1 of interceptors api added.

Modified: projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundInvoke.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundInvoke.java	2009-10-30 16:04:34 UTC (rev 95843)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundInvoke.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -29,7 +29,7 @@
 /**
  * Defines an interceptor method. The method must have the signature:
  * public Object <METHOD>(InvocationContext) throws Exception
- * 
+ *
  * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
  * @version $Revision: 44679 $
  */

Added: projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundTimeout.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundTimeout.java	                        (rev 0)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/AroundTimeout.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package javax.interceptor;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Defines an interceptor for a timeout method. The method must have the signature:
+ * public Object <METHOD>(InvocationContext) throws Exception
+ *
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ * @since 3.1
+ */
+ at Target(value=METHOD)
+ at Retention(value=RUNTIME)
+public @interface AroundTimeout {
+
+}

Modified: projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeClassInterceptors.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeClassInterceptors.java	2009-10-30 16:04:34 UTC (rev 95843)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeClassInterceptors.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -1,6 +1,6 @@
 /*
  * JBoss, the OpenSource J2EE webOS
- * 
+ *
  * Distributable under LGPL license.
  * See terms of license at gnu.org.
  */
@@ -13,7 +13,7 @@
 import java.lang.annotation.Target;
 
 /**
- * 
+ *
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @version $Revision: 44679 $
  */

Modified: projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeDefaultInterceptors.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeDefaultInterceptors.java	2009-10-30 16:04:34 UTC (rev 95843)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/ExcludeDefaultInterceptors.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -1,6 +1,6 @@
 /*
  * JBoss, the OpenSource J2EE webOS
- * 
+ *
  * Distributable under LGPL license.
  * See terms of license at gnu.org.
  */
@@ -14,7 +14,7 @@
 import java.lang.annotation.Target;
 
 /**
- * 
+ *
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @version $Revision: 57282 $
  */

Added: projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptor.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptor.java	                        (rev 0)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptor.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.interceptor;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+
+/**
+ * Specifies that a class is an interceptor.
+ *
+ * @author Gavin King
+ *
+ */
+ at Retention(RUNTIME)
+ at Target(TYPE)
+ at Documented
+public @interface Interceptor {}

Added: projects/interceptors/api/trunk/src/main/java/javax/interceptor/InterceptorBinding.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/InterceptorBinding.java	                        (rev 0)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/InterceptorBinding.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual
+ * contributors by the @authors tag. See the copyright.txt in the
+ * distribution for a full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.interceptor;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Specifies that an annotation type is an interceptor binding.
+ *
+ * @author Gavin King
+ * @author Pete Muir
+ */
+
+ at Target(ANNOTATION_TYPE)
+ at Retention(RUNTIME)
+ at Documented
+public @interface InterceptorBinding {}
+

Modified: projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptors.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptors.java	2009-10-30 16:04:34 UTC (rev 95843)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/Interceptors.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -30,12 +30,13 @@
  * An interceptor class is denoted using the Interceptor annotation on the bean
  * class with which it is associated. In the case of multiple interceptor
  * classes, the Interceptors annotation is used.
- * 
+ *
  * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
  * @version $Revision: 44679 $
  */
- at Target({TYPE, METHOD}) @Retention(RUNTIME)
-   public @interface Interceptors
+ at Target({TYPE, METHOD})
+ at Retention(RUNTIME)
+public @interface Interceptors
 {
    Class[] value();
 }

Modified: projects/interceptors/api/trunk/src/main/java/javax/interceptor/InvocationContext.java
===================================================================
--- projects/interceptors/api/trunk/src/main/java/javax/interceptor/InvocationContext.java	2009-10-30 16:04:34 UTC (rev 95843)
+++ projects/interceptors/api/trunk/src/main/java/javax/interceptor/InvocationContext.java	2009-10-30 16:09:28 UTC (rev 95844)
@@ -26,9 +26,9 @@
 /**
  * The InvocationContext object provides the metadata that is required for
  * AroundInvoke interceptor methods.
- * 
+ *
  * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
- * @version $Revision: 57282 $
+ * @version $Revision: 85923 $
  */
 public interface InvocationContext
 {
@@ -45,5 +45,12 @@
     */
    public java.util.Map<String, Object> getContextData();
 
+   /**
+    * Returns the timer associated with an @AroundTimeout method.
+    *
+    * @since 3.1
+    */
+   Object getTimer();
+
    public Object proceed() throws Exception;
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list