incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r923644 - in /incubator/hise/trunk/hise-services/src/main/java/org/apache/hise: api/Sender.java engine/HISEEngineImpl.java engine/jaxws/HISEJaxWSClient.java engine/store/TaskDD.java
Date Tue, 16 Mar 2010 09:29:03 GMT
Author: rr
Date: Tue Mar 16 09:29:03 2010
New Revision: 923644

URL: http://svn.apache.org/viewvc?rev=923644&view=rev
Log:
HISE-29: Added interfaces for easier use from camel (thanks to Maciej Prochniak)

Added:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Sender.java   (with
props)
Modified:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Sender.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Sender.java?rev=923644&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Sender.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Sender.java Tue Mar
16 09:29:03 2010
@@ -0,0 +1,31 @@
+/*
+ * 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.hise.api;
+
+import org.w3c.dom.Node;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: mproch
+ * Date: Mar 12, 2010
+ * Time: 9:41:32 PM
+ */
+public interface Sender {
+   Node invoke(Node message, Node epr);
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/Sender.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java?rev=923644&r1=923643&r2=923644&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngineImpl.java
Tue Mar 16 09:29:03 2010
@@ -19,23 +19,15 @@
 
 package org.apache.hise.engine;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
 import org.apache.commons.lang.Validate;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hise.api.HISEEngine;
 import org.apache.hise.api.HISEUserDetails;
 import org.apache.hise.api.Handler;
+import org.apache.hise.api.Sender;
 import org.apache.hise.dao.HISEDao;
 import org.apache.hise.dao.Job;
-import org.apache.hise.engine.jaxws.HISEJaxWSClient;
-import org.apache.hise.engine.store.HISEDD;
-import org.apache.hise.engine.store.TaskDD;
 import org.apache.hise.lang.TaskDefinition;
 import org.apache.hise.runtime.Task;
 import org.apache.hise.runtime.TaskEvaluator;
@@ -44,6 +36,11 @@ import org.apache.hise.utils.XQueryEvalu
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
+import javax.xml.namespace.QName;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 public class HISEEngineImpl implements HISEEngine {
     private static Log log = LogFactory.getLog(HISEEngineImpl.class);
     
@@ -152,7 +149,7 @@ public class HISEEngineImpl implements H
     public void sendResponse(QName taskName, Node body, Node epr) {
         TaskInfo ti = tasks.get(taskName);
         log.debug("sending response for " + taskName + " to " + DOMUtils.domToString(epr)
+ " body " + DOMUtils.domToString(body) + " " + ti.dd.sender);
-        HISEJaxWSClient c = (HISEJaxWSClient) ti.dd.sender;
+        Sender c = ti.dd.sender ;
         log.debug("result: " + c.invoke(body, epr));
     }
     

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java?rev=923644&r1=923643&r2=923644&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
Tue Mar 16 09:29:03 2010
@@ -19,8 +19,14 @@
 
 package org.apache.hise.engine.jaxws;
 
-import java.net.URL;
-import java.util.Iterator;
+import org.apache.commons.lang.Validate;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.cxf.jaxws.spi.ProviderImpl;
+import org.apache.hise.api.Sender;
+import org.apache.hise.utils.XQueryEvaluator;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
 
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
@@ -29,17 +35,11 @@ import javax.xml.soap.SOAPMessage;
 import javax.xml.ws.Dispatch;
 import javax.xml.ws.Service;
 import javax.xml.ws.spi.ServiceDelegate;
-
-import org.apache.commons.lang.Validate;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.cxf.jaxws.spi.ProviderImpl;
-import org.apache.hise.utils.XQueryEvaluator;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
+import java.net.URL;
+import java.util.Iterator;
 
 
-public class HISEJaxWSClient {
+public class HISEJaxWSClient implements Sender {
 
     private Log __log = LogFactory.getLog(HISEJaxWSClient.class);
     

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java?rev=923644&r1=923643&r2=923644&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/store/TaskDD.java
Tue Mar 16 09:29:03 2010
@@ -19,13 +19,16 @@
 
 package org.apache.hise.engine.store;
 
+import org.apache.hise.api.Handler;
+import org.apache.hise.api.Sender;
+
 import javax.xml.namespace.QName;
 
 public class TaskDD {
 
     public QName taskName;
-    public org.apache.hise.engine.jaxws.HISEJaxWSService handler;
-    public org.apache.hise.engine.jaxws.HISEJaxWSClient sender;
+    public Handler handler;
+    public Sender sender;
 
     public QName getTaskName() {
         return taskName;
@@ -35,20 +38,19 @@ public class TaskDD {
         this.taskName = taskName;
     }
 
-    public org.apache.hise.engine.jaxws.HISEJaxWSService getHandler() {
+    public Handler getHandler() {
         return handler;
     }
 
-    public void setHandler(org.apache.hise.engine.jaxws.HISEJaxWSService handler) {
+    public void setHandler(Handler handler) {
         this.handler = handler;
     }
 
-    public org.apache.hise.engine.jaxws.HISEJaxWSClient getSender() {
+    public Sender getSender() {
         return sender;
     }
 
-    public void setSender(org.apache.hise.engine.jaxws.HISEJaxWSClient sender) {
+    public void setSender(Sender sender) {
         this.sender = sender;
     }
-
 }



Mime
View raw message