diff options
Diffstat (limited to 'sandbox/event/modules/interface-java/src/main/java/org/apache/tuscany')
-rw-r--r-- | sandbox/event/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sandbox/event/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java b/sandbox/event/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java index b1198824fa..a63170878b 100644 --- a/sandbox/event/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java +++ b/sandbox/event/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java @@ -50,6 +50,7 @@ import org.apache.tuscany.sca.interfacedef.util.JavaXMLMapper; import org.apache.tuscany.sca.interfacedef.util.XMLType; import org.osoa.sca.annotations.Conversational; import org.osoa.sca.annotations.EndsConversation; +import org.osoa.sca.annotations.EventTypes; import org.osoa.sca.annotations.OneWay; import org.osoa.sca.annotations.Remotable; @@ -198,6 +199,15 @@ public class JavaInterfaceIntrospectorImpl { method); } } + + EventTypes eventTypesAnnotation = method.getAnnotation(EventTypes.class); + String[] eventTypes = null; + if (eventTypesAnnotation != null && eventTypesAnnotation.value().trim().length() > 0) { + eventTypes = eventTypesAnnotation.value().split(","); + for (int i = 0; i < eventTypes.length; i++) + eventTypes[i] = eventTypes[i].trim(); + + } ConversationSequence conversationSequence = ConversationSequence.CONVERSATION_NONE; if (method.isAnnotationPresent(EndsConversation.class)) { @@ -250,6 +260,7 @@ public class JavaInterfaceIntrospectorImpl { operation.setConversationSequence(conversationSequence); operation.setNonBlocking(nonBlocking); operation.setJavaMethod(method); + operation.setEventTypes(eventTypes); operations.add(operation); } return operations; |