From 3caf8614f25d6b1962e20331fdf423c863bc02f3 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:13:31 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835144 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/annotations/AllowsPassByReference.java | 38 +++++++++++++++ .../java/org/osoa/sca/annotations/Callback.java | 44 ++++++++++++++++++ .../org/osoa/sca/annotations/ComponentName.java | 35 ++++++++++++++ .../java/org/osoa/sca/annotations/Constructor.java | 35 ++++++++++++++ .../java/org/osoa/sca/annotations/Context.java | 36 +++++++++++++++ .../org/osoa/sca/annotations/Conversation.java | 51 ++++++++++++++++++++ .../org/osoa/sca/annotations/ConversationID.java | 35 ++++++++++++++ .../java/org/osoa/sca/annotations/Destroy.java | 35 ++++++++++++++ .../java/org/osoa/sca/annotations/EagerInit.java | 43 +++++++++++++++++ .../org/osoa/sca/annotations/EndConversation.java | 34 ++++++++++++++ .../main/java/org/osoa/sca/annotations/Init.java | 36 +++++++++++++++ .../main/java/org/osoa/sca/annotations/OneWay.java | 36 +++++++++++++++ .../java/org/osoa/sca/annotations/Property.java | 54 ++++++++++++++++++++++ .../java/org/osoa/sca/annotations/Reference.java | 46 ++++++++++++++++++ .../java/org/osoa/sca/annotations/Remotable.java | 36 +++++++++++++++ .../java/org/osoa/sca/annotations/Resource.java | 49 ++++++++++++++++++++ .../main/java/org/osoa/sca/annotations/Scope.java | 45 ++++++++++++++++++ .../java/org/osoa/sca/annotations/Service.java | 43 +++++++++++++++++ 18 files changed, 731 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java create mode 100644 sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java (limited to 'sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations') diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java new file mode 100644 index 0000000000..dcf16126da --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +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}) +@Retention(RUNTIME) +public @interface AllowsPassByReference { +} + diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java new file mode 100644 index 0000000000..dbfdce7e7c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * When placed on a service interface, this annotation specifies the interface + * to be used for callbacks. + *

+ * 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; +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java new file mode 100644 index 0000000000..0ad13831c2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a field or method that is used to inject the component's name. + * + * @version $Rev$ $Date$ + */ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface ComponentName { +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java new file mode 100644 index 0000000000..8480b38926 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Used to indicate the constructor the runtime is to use when instantiating a component implementation instance + * + * @version $Rev$ $Date$ + */ +@Target(CONSTRUCTOR) +@Retention(RUNTIME) +public @interface Constructor { + String[] value() default ""; +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java new file mode 100644 index 0000000000..93f6710578 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a field or method that is used to inject the component's CompositeContext. + * + * @version $Rev$ $Date$ + */ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface Context { +} + diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java new file mode 100644 index 0000000000..fe57e7a9c6 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate the characteristics of a conversation. + * + * @version $Rev$ $Date$ + */ +@Target(TYPE) +@Retention(RUNTIME) +public @interface Conversation { + /** + * The maximum time that can pass between operations in a single conversation. + * If this time is exceeded the container may end the conversation. + */ + public String maxIdleTime() default ""; + + /** + * The maximum time that a conversation may remain active. + * If this time is exceeded the container may end the conversation. + */ + public String maxAge() default ""; + + /** + * If true, indicates that only the user that initiated the conversation + * has the authority to continue it. + */ + public boolean singlePrincipal() default false; +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java new file mode 100644 index 0000000000..e521b91797 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a field or method that is used to inject the conversation ID. + * + * @version $Rev$ $Date$ + */ +@Target({METHOD, FIELD}) +@Retention(RUNTIME) +public @interface ConversationID { +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java new file mode 100644 index 0000000000..0a81dbe14c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.METHOD; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a method that will be called by the container when the + * scope defined for the local service ends. + * + * @version $Rev$ $Date$ + */ +@Target(METHOD) +@Retention(RUNTIME) +public @interface Destroy { +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java new file mode 100644 index 0000000000..7fb9885fb4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate an instance should be eagerly initialized. + * + * @version $Rev$ $Date$ + */ +@Target({TYPE}) +@Retention(RetentionPolicy.RUNTIME) +public @interface EagerInit { + + /** + * A Tuscany-specific extension for specifying the component's initialization order, with lesser values given + * precedence. A value of 0 indicates the component should not be initialized eagerly. + * + * @return the component initalization level + */ + public int value() default 50; + +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java new file mode 100644 index 0000000000..14f7ef865f --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a method ends a conversation. + * + * @version $Rev$ $Date$ + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface EndConversation { +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java new file mode 100644 index 0000000000..957bec262c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.METHOD; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a method that will be called by the container when the scope defined for the local + * service begins. + * + * @version $Rev$ $Date$ + */ +@Target(METHOD) +@Retention(RUNTIME) +public @interface Init { + +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java new file mode 100644 index 0000000000..fbc7398da4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Annotation on a method that indicates that the method is non-blocking and communication + * with the service provider may use buffer the requests and send them at some later time. + * + * @version $Rev$ $Date$ + */ +@Target({METHOD}) +@Retention(RUNTIME) +public @interface OneWay { +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java new file mode 100644 index 0000000000..acbc35a1ec --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a constructor parameter, field or method that is + * used to inject a configuration property value. + * + * @version $Rev$ $Date$ + */ +@Target( {METHOD, FIELD, PARAMETER}) +@Retention(RUNTIME) +public @interface Property { + /** + * The name of the property. If not specified then the name will be derived + * from the annotated field. + */ + public String name() default ""; + + /** + * Indicates if a value must be specified. + */ + public String override() default "may"; + + /** + * The XML Type in a QName format + */ + public String xmlType() default ""; + +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java new file mode 100644 index 0000000000..7fceafadf3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a constructor parameter, field or method that is used to inject a reference. + * + * @version $Rev$ $Date$ + */ +@Target({METHOD, FIELD, PARAMETER}) +@Retention(RUNTIME) +public @interface Reference { + /** + * The name of the reference. If not specified then the name will be derived from the annotated field. + */ + public String name() default ""; + + /** + * Indicates if a reference must be specified. + */ + public boolean required() default false; +} + diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java new file mode 100644 index 0000000000..f447a4126d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a Java interface as remotable. + * Remotable interfaces use pass-by-value semantics, can be published as entry points + * and used for external services. + * + * @version $Rev$ $Date$ + */ +@Target(TYPE) +@Retention(RUNTIME) +public @interface Remotable { +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java new file mode 100644 index 0000000000..b3e3855719 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import java.lang.annotation.Target; +import java.lang.annotation.Retention; +import java.lang.annotation.ElementType; +import java.lang.annotation.RetentionPolicy; + +/** + * Annotation used to indicate a resource should be provided to an implementation by the runtime. + * + * @version $Rev$ $Date$ + */ +@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +public @interface Resource { + + /** + * Denotes the name of the resource declared by the implementation. + */ + public String name() default ""; + + /** + * Denotes if the resource is optional + */ + public boolean optional() default false; + + /** + * Denotes the default name of the resource provided by the runtime environment. + */ + public String mappedName() default ""; +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java new file mode 100644 index 0000000000..6f952d489c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate a scoped service. + * + * @version $Rev$ $Date$ + */ +@Target(TYPE) +@Retention(RUNTIME) +public @interface Scope { + /** + * The name of the scope. Values currently defined by the specification are: + *

+ */ + String value() default "STATELESS"; +} diff --git a/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java new file mode 100644 index 0000000000..33e7a93ea3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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 org.osoa.sca.annotations; + +import static java.lang.annotation.ElementType.TYPE; +import java.lang.annotation.Retention; +import static java.lang.annotation.RetentionPolicy.RUNTIME; +import java.lang.annotation.Target; + +/** + * Annotation used to indicate the service interfaces exposed by a Java class. + * + * @version $Rev$ $Date$ + */ +@Target({TYPE}) +@Retention(RUNTIME) +public @interface Service { + /** + * Array of interfaces that should be exposed as services. + */ + Class[] interfaces() default {}; + + /** + * Shortcut allowing a single interface to be exposed. + */ + Class value() default Void.class; +} -- cgit v1.2.3