summaryrefslogtreecommitdiff
path: root/bkucommon/src/main/java/at/gv/egiz/bku/binding
diff options
context:
space:
mode:
authorwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-25 07:29:47 +0000
committerwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-25 07:29:47 +0000
commite21dd5249d5fa19c5619847922cf8cdea95e3145 (patch)
tree00756b302d7fe37a4912ff5da812e25e2a781d9b /bkucommon/src/main/java/at/gv/egiz/bku/binding
parent55302f2bbe65d28a21d61822f3c316a7fafd1eff (diff)
downloadmocca-e21dd5249d5fa19c5619847922cf8cdea95e3145.tar.gz
mocca-e21dd5249d5fa19c5619847922cf8cdea95e3145.tar.bz2
mocca-e21dd5249d5fa19c5619847922cf8cdea95e3145.zip
improved robustness of http binding processor
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@70 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'bkucommon/src/main/java/at/gv/egiz/bku/binding')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java4
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java9
2 files changed, 11 insertions, 2 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java
index c386508d..2569bf85 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/BindingProcessor.java
@@ -71,5 +71,7 @@ public interface BindingProcessor extends Runnable {
* If the locale is not set the default locale will be used.
* @param locale must not be null.
*/
- public void setLocale(Locale locale);
+ public void setLocale(Locale locale);
+
+ public boolean isFinished();
} \ No newline at end of file
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java
index 8f72c3ee..5e44e82b 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/binding/HTTPBindingProcessor.java
@@ -115,6 +115,7 @@ public class HTTPBindingProcessor extends AbstractBindingProcessor implements
protected int responseCode = 200;
protected Map<String, String> responseHeaders = Collections.EMPTY_MAP;
protected Locale locale = Locale.getDefault();
+ protected boolean finished = false;
/**
*
@@ -246,6 +247,7 @@ public class HTTPBindingProcessor extends AbstractBindingProcessor implements
commandInvoker.setCommand(slCommand);
responseCode = 200;
responseHeaders = Collections.EMPTY_MAP;
+ dataUrlResponse = null;
try {
commandInvoker.invoke(srcContex);
} catch (SLException e) {
@@ -253,7 +255,6 @@ public class HTTPBindingProcessor extends AbstractBindingProcessor implements
bindingProcessorError = e;
currentState = State.TRANSFORM;
}
- dataUrlResponse = null;
if (getDataUrl() != null) {
log.debug("Data Url set to: " + getDataUrl());
currentState = State.DATAURL;
@@ -495,6 +496,7 @@ public class HTTPBindingProcessor extends AbstractBindingProcessor implements
sendSTALQuit();
log.info("Terminating Bindingprocessor; Thread: "
+ Thread.currentThread().getId());
+ finished = true;
}
// -- END Methods that handle the http binding activities as defined in the
@@ -620,6 +622,7 @@ public class HTTPBindingProcessor extends AbstractBindingProcessor implements
currentState = State.FINISHED;
}
log.debug("Terminated http binding processor");
+ finished = true;
}
@Override
@@ -805,4 +808,8 @@ public class HTTPBindingProcessor extends AbstractBindingProcessor implements
this.locale = locale;
}
+ @Override
+ public boolean isFinished() {
+ return finished;
+ }
} \ No newline at end of file