You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2014/12/02 15:51:05 UTC

svn commit: r1642885 - /uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/HttpWorkerThread.java

Author: cwiklik
Date: Tue Dec  2 14:51:05 2014
New Revision: 1642885

URL: http://svn.apache.org/r1642885
Log:
UIMA-4138 replace strings with enumeration for message types

Modified:
    uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/HttpWorkerThread.java

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/HttpWorkerThread.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/HttpWorkerThread.java?rev=1642885&r1=1642884&r2=1642885&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/HttpWorkerThread.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/configuration/jp/HttpWorkerThread.java Tue Dec  2 14:51:05 2014
@@ -246,12 +246,12 @@ public class HttpWorkerThread implements
 					// HTTP request. HttpClient actually enforces this. So
 					// do a POST instead of a GET.
 					transaction.setType(Type.Get);  // Tell JD you want a CAS
-					command = "Get";
+					command = Type.Get.name();
 					transaction = httpClient.post(transaction);
                     
 					// Confirm receipt of the CAS. 
 					transaction.setType(Type.Ack);
-					command = "Ack";
+					command = Type.Ack.name();
 					httpClient.post(transaction); // Ready to process
 					
 					// if the JD did not provide a CAS, most likely the CR is
@@ -277,9 +277,10 @@ public class HttpWorkerThread implements
 							}
 						}
 					} else {
+						// process the CAS
 						uimaProcessor.process(transaction.getMetaCas().getUserSpaceCas());
 						transaction.setType(Type.End);
-						command = "End";
+						command = Type.End.name();
 						httpClient.post(transaction); // Work Item Processed - End
 					}
 				} catch( SocketTimeoutException e) {