From af0cfc49958afa2ef6c44384cb5d5d8ca4c516da Mon Sep 17 00:00:00 2001 From: rsivaram Date: Wed, 12 Nov 2008 13:16:06 +0000 Subject: Event prototype: event binding with JMS-based default binding git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@713362 13f79535-47bb-0310-9956-ffa450edef68 --- .../interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sandbox/event/modules/interface-java/src/main/java/org/apache') 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; -- cgit v1.2.3