Package org.netbeans.server.snapshots

Examples of org.netbeans.server.snapshots.SnapshotManager


            public TransactionResult runQuery(EntityManager em) throws IOException {
                Submit sb = Submit.getById(em, id);
                if (sb == null) {
                    return TransactionResult.NONE;
                }
                SnapshotManager sm = SnapshotManager.loadSnapshot(sb.getLogfileId());
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                DataOutputStream dos = new DataOutputStream(bos);
                sm.save(dos);
                dos.close();
                String additionalS = "";
                if(sm.hasNpssContent()){
                    additionalS = "s";
                }
                response.setContentType("application/x-nps"+additionalS);
                String fileName = String.format("snapshot-%1$s.nps", id.toString());
                response.setHeader( "Content-Disposition", "attachment; filename=" + fileName+additionalS);
View Full Code Here


     */
    @Override
    public void doTag() throws JspException {
        JspWriter out = getJspContext().getOut();

        SnapshotManager manager = SnapshotManager.loadSnapshot(slowness.getLogfileId());
        if (manager == null) {
            return;
        }
        manager.printAWTThread(new PrintWriter(out));
    }
View Full Code Here

    @Override
    public Attachment getAttachment() {
        byte[] data = null;
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            SnapshotManager sm = SnapshotManager.loadSnapshot(getLogfileId());
            DataOutputStream dos = new DataOutputStream(bos);
            if (sm != null){
                sm.save(dos);
            }
            dos.close();
            data = bos.toByteArray();
        } catch (IOException ex) {
            Exceptions.printStackTrace(ex);
View Full Code Here

TOP

Related Classes of org.netbeans.server.snapshots.SnapshotManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.