Author: asoldano
Date: 2013-08-23 08:32:23 -0400 (Fri, 23 Aug 2013)
New Revision: 17887
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
Log:
Adding some comments / improving javadoc
Modified:
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-08-23
12:21:24 UTC (rev 17886)
+++
stack/cxf/trunk/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/AppclientHelper.java 2013-08-23
12:32:23 UTC (rev 17887)
@@ -71,6 +71,16 @@
// forbidden instantiation
}
+ /**
+ * Triggers appclient deployment and returns the corresponding Process
+ * Please note the provided output stream (if any) is not automatically closed.
+ *
+ * @param archive
+ * @param appclientOS
+ * @param appclientArgs
+ * @return
+ * @throws Exception
+ */
static Process deployAppclient(final String archive, final OutputStream appclientOS,
final String... appclientArgs) throws Exception
{
final AppclientProcess ap = newAppclientProcess(archive, appclientOS,
appclientArgs);
@@ -139,6 +149,10 @@
}
}
+ //note on output streams closing: we're not caring about closing any here as
it's quite a complex thing due to the TeeOutputStream nesting;
+ //we're however still safe, given the ap.output is a ByteArrayOutputStream
(whose .close() does nothing), ap.log is explicitly closed at
+ //undeploy and closing appclientOS is a caller responsibility.
+
ap.log = new FileOutputStream(new File(getAppclientOutputDir(),
appclientShortName + ".log-" + System.currentTimeMillis()));
final OutputStream logOutputStreams = (appclientOS == null) ? ap.log : new
TeeOutputStream(ap.log, appclientOS);
printLogTrailer(logOutputStreams, appclientFullName);
Show replies by date