public String getOutput() { final ByteArrayOutputStream os = new ByteArrayOutputStream(); try { actionReport.writeReport(os); return os.toString(); } catch (IOException e) { throw new RuntimeException(e); } finally { try { os.close(); } catch (IOException e) { // ignore } } }
public String getOutput() { final ByteArrayOutputStream os = new ByteArrayOutputStream(); try { actionReport.writeReport(os); return os.toString(); } catch (IOException e) { throw new RuntimeException(e); } finally { try { os.close(); } catch (IOException e) { // ignore } } }
@Override public void undeploy(String appName, String... params) throws GlassFishException { String[] newParams = new String[params.length + 1]; System.arraycopy(params, 0, newParams, 0, params.length); newParams[params.length] = appName; CommandExecutorImpl executer = habitat.getService(CommandExecutorImpl.class); try { ActionReport actionReport = executer.executeCommand("undeploy", newParams); actionReport.writeReport(System.out); } catch (CommandException e) { throw new GlassFishException(e); } catch (IOException e) { throw new GlassFishException(e); } }
actionReport.writeReport(baos); final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); final Properties reportProps = new Properties();
actionReport.writeReport(baos); final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); final Properties reportProps = new Properties();
@Override public void undeploy(String appName, String... params) throws GlassFishException { String[] newParams = new String[params.length + 1]; System.arraycopy(params, 0, newParams, 0, params.length); newParams[params.length] = appName; CommandExecutorImpl executer = habitat.getComponent(CommandExecutorImpl.class); try { ActionReport actionReport = executer.executeCommand("undeploy", newParams); actionReport.writeReport(System.out); } catch (CommandException e) { throw new GlassFishException(e); } catch (IOException e) { throw new GlassFishException(e); } }
extractPayload(outboundPayload, actionReport, retrieve); actionReport.writeReport(System.out); return actionReport.getResultType(String.class); } catch (CommandException e) {
private void reportAuthFailure(final Response res, final ActionReport report, final String msgKey, final String msg, final int httpStatus, final String headerName, final String headerValue) throws IOException { report.setActionExitCode(ActionReport.ExitCode.FAILURE); final String messageForResponse = adminStrings.getLocalString(msgKey, msg); report.setMessage(messageForResponse); report.setActionDescription("Authentication error"); res.setStatus(httpStatus, messageForResponse); if (headerName != null) { res.setHeader(headerName, headerValue); } res.setContentType(report.getContentType()); report.writeReport(res.getOutputStream()); res.getOutputStream().flush(); res.finish(); }
report.writeReport(baos); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); final Properties reportProps = new Properties();