summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api')
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/LogLevel.java41
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/Monitor.java34
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/Resource.java49
3 files changed, 124 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/LogLevel.java b/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/LogLevel.java
new file mode 100644
index 0000000000..47e205f074
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/LogLevel.java
@@ -0,0 +1,41 @@
+/*
+ * 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.apache.tuscany.api.annotation;
+
+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 that can be applied to methods in a monitoring interface to indicate to logging frameworks the severity of
+ * the event.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD})
+@Retention(RUNTIME)
+public @interface LogLevel {
+
+ /**
+ * The log level as specified by {@link java.util.logging.Level}.
+ */
+ @SuppressWarnings({"JavaDoc"}) String value();
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/Monitor.java b/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/Monitor.java
new file mode 100644
index 0000000000..dea9489e5b
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/Monitor.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.apache.tuscany.api.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * A system annotation to inject a monitor
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Monitor {
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/Resource.java b/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/Resource.java
new file mode 100644
index 0000000000..a7158ab6b8
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/implementation-java-xml/src/main/java/org/apache/tuscany/api/annotation/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.apache.tuscany.api.annotation;
+
+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 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.
+ */
+ String name() default "";
+
+ /**
+ * Denotes if the resource is optional
+ */
+ boolean optional() default false;
+
+ /**
+ * Denotes the default name of the resource provided by the runtime environment.
+ */
+ String mappedName() default "";
+}