use of com.sun.enterprise.v3.common.PropsFileActionReporter in project Payara by payara.
the class DeleteIiopListenerTest method setUp.
@Before
public void setUp() {
services = getHabitat();
iiopService = services.getService(IiopService.class);
parameters = new ParameterMap();
cr = services.getService(CommandRunner.class);
context = new AdminCommandContextImpl(LogDomains.getLogger(DeleteIiopListenerTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
}
use of com.sun.enterprise.v3.common.PropsFileActionReporter in project Payara by payara.
the class ListIiopListenersTest method setUp.
@Before
public void setUp() {
services = getHabitat();
IiopService iiopService = services.getService(IiopService.class);
parameters = new ParameterMap();
cr = services.getService(CommandRunner.class);
context = new AdminCommandContextImpl(LogDomains.getLogger(ListIiopListenersTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
List<IiopListener> listenerList = iiopService.getIiopListener();
origNum = listenerList.size();
}
use of com.sun.enterprise.v3.common.PropsFileActionReporter in project Payara by payara.
the class DumpHK2Command method execute.
public void execute(AdminCommandContext context) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
modulesRegistry.dumpState(new PrintStream(baos));
ActionReport report = context.getActionReport();
report.setActionExitCode(ExitCode.SUCCESS);
String msg = baos.toString();
// cause problems. Manifest.write() is OK but Manifest.read() explodes!
if (report instanceof PropsFileActionReporter) {
msg = ManifestUtils.encode(msg);
}
report.setMessage(msg);
}
use of com.sun.enterprise.v3.common.PropsFileActionReporter in project Payara by payara.
the class GetHabitatInfo method execute.
@Override
public void execute(AdminCommandContext context) {
StringBuilder sb = new StringBuilder();
if (contract == null) {
dumpContracts(sb);
dumpModules(sb);
dumpTypes(sb);
} else {
dumpInhabitantsImplementingContractPattern(contract, sb);
}
String msg = sb.toString();
ActionReport report = context.getActionReport();
report.setActionExitCode(ExitCode.SUCCESS);
if (report instanceof PropsFileActionReporter) {
msg = ManifestUtils.encode(msg);
}
report.setMessage(msg);
}
use of com.sun.enterprise.v3.common.PropsFileActionReporter in project Payara by payara.
the class JerseyContainerCommandService method postConstruct.
@Override
public void postConstruct() {
if (Boolean.valueOf(System.getenv("AS_INIT_REST_EAGER"))) {
ExecutorService executor = Executors.newFixedThreadPool(2);
this.future = executor.submit(new Callable<JerseyContainer>() {
@Override
public JerseyContainer call() throws Exception {
return exposeContext();
}
});
executor.execute(new Runnable() {
@Override
public void run() {
final CommandRunner.CommandInvocation invocation = habitat.getService(CommandRunner.class).getCommandInvocation("uptime", new PropsFileActionReporter(), kernelIdentity.getSubject());
invocation.parameters(new ParameterMap());
invocation.execute();
}
});
executor.shutdown();
}
}
Aggregations