use of com.sun.enterprise.v3.common.PlainTextActionReporter in project Payara by payara.
the class AdminCommandContextTest method testSerialization.
@Test
public void testSerialization() throws IOException, ClassNotFoundException {
ByteArrayOutputStream os = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(os);
ActionReport report = new PlainTextActionReporter();
AdminCommandContext context = new AdminCommandContextImpl(null, /* logger */
report);
report.setFailureCause(new RuntimeException("Test"));
oos.writeObject(context);
ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
ObjectInputStream ois = new ObjectInputStream(is);
AdminCommandContext restored = (AdminCommandContextImpl) ois.readObject();
assertEquals("failureCause", "Test", restored.getActionReport().getFailureCause().getMessage());
// context.setPayload
}
use of com.sun.enterprise.v3.common.PlainTextActionReporter in project Payara by payara.
the class MonitoringReporter method runAggregate.
private void runAggregate() {
List<String> list = getOutputLines();
ActionReport aggregateReporter = null;
if (aggregateDataOnly) {
plainReporter = new PlainTextActionReporter();
aggregateReporter = plainReporter.addSubActionsReport();
} else
aggregateReporter = reporter.addSubActionsReport();
setClusterInfo(aggregateReporter, list);
if (aggregateDataOnly) {
reporter = plainReporter;
context.setActionReport(plainReporter);
}
}
Aggregations