12.9.1-2 baseline

Former-commit-id: 4d7a2d3ad046df5dabf1a2ec6c24a37f8bbdc2d2
This commit is contained in:
Steve Harris 2012-08-15 14:12:24 -05:00
parent 31ae7ea218
commit d1d877d319
2 changed files with 8 additions and 13 deletions

View file

@ -47,6 +47,7 @@ import com.raytheon.viz.mpe.Activator;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 1/08/09 1674 bphillip Initial creation
* 08/09/12 15307 snaples Updated job to use postStreamingByteArray.
* </pre>
*
* @author bphillip
@ -79,10 +80,11 @@ public class MpeFieldGenJob extends Job {
final Integer[] mpeExitValue = new Integer[1];
String httpAddress = VizApp.getHttpServer();
String args = ENDPOINT_NAME + fieldGenArg;
byte[] ba = args.getBytes();
try {
HttpClient.getInstance().postStreamingString(
httpAddress + ENDPOINT_NAME, fieldGenArg,
HttpClient.getInstance().postStreamingByteArray(httpAddress, ba,
new HttpClient.IStreamHandler() {
/*
@ -113,15 +115,7 @@ public class MpeFieldGenJob extends Job {
return new Status(Status.ERROR, Activator.PLUGIN_ID,
"MPE Field Gen execution failed with exit code: "
+ mpeExitValue[0]);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block. Please revise as appropriate.
handler.handle(Priority.CRITICAL, e.getLocalizedMessage(), e);
// copied from above
return new Status(Status.ERROR, Activator.PLUGIN_ID,
"MPE Field Gen execution failed with exit code: "
+ mpeExitValue[0]);
}
}
if (mpeExitValue[0] != null && mpeExitValue[0] == 0) {
return Status.OK_STATUS;

View file

@ -69,6 +69,7 @@ import com.raytheon.uf.common.util.ByteArrayOutputStreamPool.ByteArrayOutputStre
* 5/17/10 #5901 njensen Moved to common
* 03/02/11 #8045 rferrel Add connect reestablished message.
* 07/17/12 #911 njensen Refactored significantly
* 08/09/12 15307 snaples Added putEntitiy in postStreamingEntity.
*
* </pre>
*
@ -286,7 +287,6 @@ public class HttpClient {
String msg = currentCount + " ongoing http requests to " + host
+ ". Likely waiting for free connection from pool.";
statusHandler.debug(msg);
System.out.println(msg);
}
while (retry) {
retry = false;
@ -485,6 +485,7 @@ public class HttpClient {
private void postStreamingEntity(String address, AbstractHttpEntity entity,
IStreamHandler handlerCallback) throws CommunicationException {
HttpPost put = new HttpPost(address);
put.setEntity(entity);
process(put, handlerCallback);
}