Package rlVizLib.messaging

Examples of rlVizLib.messaging.BinaryPayload


        }

        @Override
        public String makeStringResponse() {
            try {
                BinaryPayload P = new BinaryPayload();
                DataOutputStream DOS = P.getOutputStream();
                ImageIO.write(theImage, "PNG", DOS);
                String theEncodedImage = P.getAsEncodedString();
                String theResponse = AbstractMessage.makeMessage(MessageUser.kBenchmark.id(), MessageUser.kEnv.id(), EnvMessageType.kEnvResponse.id(), MessageValueType.kStringList.id(), theEncodedImage);

                return theResponse;
            } catch (IOException ex) {
                Logger.getLogger(EnvGraphicRequest.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here


            this.errorMessage = "";
        }
    }

    String getAsEncodedString() {
        BinaryPayload P = new BinaryPayload();
        DataOutputStream DOS = P.getOutputStream();
        try {
            DOS.writeBoolean(supported);
            DOS.writeBoolean(errorStatus);
        } catch (IOException ex) {
            Logger.getLogger(EnvShellTaskSpecResponse.class.getName()).log(Level.SEVERE, null, ex);
        }
        P.writeRawString(errorMessage);
       
        String encodedPayload = P.getAsEncodedString();
        return encodedPayload;
    }
View Full Code Here

            this.errorMessage = "";
        }
    }

    String getAsEncodedString() {
        BinaryPayload P = new BinaryPayload();
        DataOutputStream DOS = P.getOutputStream();
        try {
            DOS.writeBoolean(supported);
            DOS.writeBoolean(errorStatus);
        } catch (IOException ex) {
            Logger.getLogger(EnvShellTaskSpecResponse.class.getName()).log(Level.SEVERE, null, ex);
        }
        P.writeRawString(taskSpec);
        P.writeRawString(errorMessage);
       
        String encodedPayload = P.getAsEncodedString();
        return encodedPayload;
    }
View Full Code Here

    public ParameterHolder getTheParams() {
        return theParams;
    }
    //This is intended for debugging but works well to be just called to save code duplication
    public static String getRequestMessage(String agentName, ParameterHolder theParams, String theTaskSpec) {
        BinaryPayload P = new BinaryPayload();
        P.writeRawString(agentName);
        if (theParams == null) {
            P.writeRawString("NULL");
        } else {
            P.writeRawString(theParams.stringSerialize());
        }
        P.writeRawString(theTaskSpec);
        String payLoadString = P.getAsEncodedString();

        return AbstractMessage.makeMessage(
                MessageUser.kAgentShell.id(),
                MessageUser.kBenchmark.id(),
                AgentShellMessageType.kAgentShellTaskSpecCompat.id(),
View Full Code Here

        }

        @Override
        public String makeStringResponse() {
            try {
                BinaryPayload P = new BinaryPayload();
                DataOutputStream DOS = P.getOutputStream();
                ImageIO.write(theImage, "PNG", DOS);
                String theEncodedImage = P.getAsEncodedString();
                String theResponse = AbstractMessage.makeMessage(MessageUser.kBenchmark.id(), MessageUser.kAgent.id(), AgentMessageType.kAgentResponse.id(), MessageValueType.kStringList.id(), theEncodedImage);

                return theResponse;
            } catch (IOException ex) {
                Logger.getLogger(AgentGraphicRequest.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

TOP

Related Classes of rlVizLib.messaging.BinaryPayload

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.