Author: jboynes
Date: Sat Mar 25 08:34:51 2006
New Revision: 388784
URL: http://svn.apache.org/viewcvs?rev=388784&view=rev
Log:
cosmetic - clean up IDEA warnings in sca spec module
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ModuleContext.java
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceReference.java
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceRuntimeException.java
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/SessionEndedException.java
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ModuleContext.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ModuleContext.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ModuleContext.java
(original)
+++
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ModuleContext.java
Sat Mar 25 08:34:51 2006
@@ -18,6 +18,9 @@
/**
+ * Interface that can be used by SCA Components to access information about the
+ * Module that contains them.
+ *
* @version $Rev$ $Date$
*/
public interface ModuleContext {
@@ -79,7 +82,21 @@
*/
ServiceReference createServiceReferenceForSession(Object self, String
serviceName);
+ /**
+ * Create a new session for stateful interaction with the named service.
+ *
+ * @param serviceName the name of the service to interact with
+ * @return a reference to the service
+ */
ServiceReference newSession(String serviceName);
+ /**
+ * Create a new session for stateful interaction with the named service
+ * using an application-supplied session identifier.
+ *
+ * @param serviceName the name of the service to interact with
+ * @param sessionId a token that identifies this session
+ * @return a reference to the service
+ */
ServiceReference newSession(String serviceName, Object sessionId);
}
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
(original)
+++
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
Sat Mar 25 08:34:51 2006
@@ -17,22 +17,49 @@
package org.osoa.sca;
/**
+ * Exception thrown to indicate that no callback has been registered
+ * when interacting with a service.
+ *
* @version $Rev$ $Date$
*/
public class NoRegisteredCallbackException extends ServiceRuntimeException {
private static final long serialVersionUID = 3734864942222558406L;
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @see ServiceRuntimeException
+ */
public NoRegisteredCallbackException() {
}
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
public NoRegisteredCallbackException(String message) {
super(message);
}
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
public NoRegisteredCallbackException(String message, Throwable cause) {
super(message, cause);
}
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
public NoRegisteredCallbackException(Throwable cause) {
super(cause);
}
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceReference.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceReference.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceReference.java
(original)
+++
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceReference.java
Sat Mar 25 08:34:51 2006
@@ -38,7 +38,7 @@
void endSession();
/**
- * Returns the callback ID
+ * Returns the callback ID.
*
* @return the callback ID
*/
@@ -52,14 +52,14 @@
void setCallbackID(Object callbackID);
/**
- * Returns the callback object
+ * Returns the callback object.
*
* @return the callback object
*/
Object getCallback();
/**
- * Sets the callback object
+ * Sets the callback object.
*
* @param callback the callback object
*/
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceRuntimeException.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceRuntimeException.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceRuntimeException.java
(original)
+++
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/ServiceRuntimeException.java
Sat Mar 25 08:34:51 2006
@@ -18,22 +18,49 @@
/**
+ * Base for Exceptions that may be raised by an SCA runtime and which typical
+ * application code is not expected to be able to handle.
+ *
* @version $Rev$ $Date$
*/
public class ServiceRuntimeException extends RuntimeException {
private static final long serialVersionUID = -3876058842262557092L;
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @see RuntimeException
+ */
public ServiceRuntimeException() {
}
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param message passed to RuntimeException
+ * @see RuntimeException
+ */
public ServiceRuntimeException(String message) {
super(message);
}
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param message passed to RuntimeException
+ * @param cause passed to RuntimeException
+ * @see RuntimeException
+ */
public ServiceRuntimeException(String message, Throwable cause) {
super(message, cause);
}
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param cause passed to RuntimeException
+ * @see RuntimeException
+ */
public ServiceRuntimeException(Throwable cause) {
super(cause);
}
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/SessionEndedException.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/SessionEndedException.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/SessionEndedException.java
(original)
+++
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/SessionEndedException.java
Sat Mar 25 08:34:51 2006
@@ -17,22 +17,49 @@
package org.osoa.sca;
/**
+ * Exception thrown to indicate the session being used for a stateful
+ * interaction has been ended.
+ *
* @version $Rev$ $Date$
*/
public class SessionEndedException extends ServiceRuntimeException {
private static final long serialVersionUID = 3734864942222558406L;
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @see ServiceRuntimeException
+ */
public SessionEndedException() {
}
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
public SessionEndedException(String message) {
super(message);
}
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
public SessionEndedException(String message, Throwable cause) {
super(message, cause);
}
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
public SessionEndedException(Throwable cause) {
super(cause);
}
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
(original)
+++
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
Sat Mar 25 08:34:51 2006
@@ -23,6 +23,10 @@
import java.lang.annotation.Target;
/**
+ * Annotation on a method that indicates that its parameters may safely
+ * be passed by reference. The annotation may also be placed on an interface
+ * or class to indicate that all declared methods support this optimization.
+ *
* @version $Rev$ $Date$
*/
@Target({TYPE, METHOD})
Modified:
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java
(original)
+++
incubator/tuscany/java/spec/sca/src/main/java/org/osoa/sca/annotations/Callback.java
Sat Mar 25 08:34:51 2006
@@ -24,10 +24,19 @@
import java.lang.annotation.Target;
/**
+ * When placed on a service interface, this annotation specifies the interface
+ * to be used for callbacks.
+ * <p/>
+ * When placed on a method or field, this annotation denotes the injection
+ * site to be used for a callback reference.
+ *
* @version $Rev$ $Date$
*/
@Target({TYPE, METHOD, FIELD})
@Retention(RUNTIME)
public @interface Callback {
+ /**
+ * The Class of the callback interface.
+ */
Class<?> value() default Void.class;
}
Modified:
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java
(original)
+++
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java
Sat Mar 25 08:34:51 2006
@@ -23,6 +23,8 @@
import org.osoa.sca.annotations.usage.CallbackType;
/**
+ * Test case for callback annotation.
+ *
* @version $Rev$ $Date$
*/
public class CallbackTestCase extends TestCase {
@@ -30,18 +32,27 @@
private Field field;
private Method method;
+ /**
+ * Test annotation of a callback interface.
+ */
public void testTypeDeclaration() {
assertTrue(type.isAnnotationPresent(Callback.class));
Callback callback = type.getAnnotation(Callback.class);
assertEquals(Object.class, callback.value());
}
+ /**
+ * Test annotation of a private field.
+ */
public void testField() {
assertTrue(field.isAnnotationPresent(Callback.class));
Callback callback = field.getAnnotation(Callback.class);
assertEquals(Void.class, callback.value());
}
+ /**
+ * Test annotation of a method.
+ */
public void testMethod() {
assertTrue(method.isAnnotationPresent(Callback.class));
Callback callback = method.getAnnotation(Callback.class);
Modified:
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java
URL:
http://svn.apache.org/viewcvs/incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java?rev=388784&r1=388783&r2=388784&view=diff
==============================================================================
---
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java
(original)
+++
incubator/tuscany/java/spec/sca/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java
Sat Mar 25 08:34:51 2006
@@ -19,6 +19,8 @@
import org.osoa.sca.annotations.Callback;
/**
+ * Mock object for callback annotation tests.
+ *
* @version $Rev$ $Date$
*/
@Callback(Object.class)
@@ -26,7 +28,20 @@
@Callback
private Object cbField;
+ /**
+ * Site for testing annotation of a public method.
+ */
@Callback
public void cbMethod() {
+ cbField = new Object();
+ }
+
+ /**
+ * Mock method to make IDEs stop complaining.
+ *
+ * @return nothing
+ */
+ public Object getCbField() {
+ return cbField;
}
}