Package org.openamf

Examples of org.openamf.AMFMessage


     * @throws ServletException
     * @throws IOException
     */
    public void service(HttpServlet servlet, HttpServletRequest req, HttpServletResponse rsp) throws IOException {
     
      AMFMessage requestMessage = null;
        AMFMessage responseMessage = null;
        requestMessage = deserializeAMFMessage(req);
        responseMessage = processMessage(servlet, req, rsp, requestMessage);
        serializeAMFMessage(rsp, responseMessage);
    }
View Full Code Here


    private AMFMessage deserializeAMFMessage(HttpServletRequest req) throws IOException {
        DataInputStream dis = null;
         try {
           dis = new DataInputStream(req.getInputStream());
           AMFDeserializer deserializer = new AMFDeserializer(dis);
           AMFMessage message = deserializer.getAMFMessage();
           return message;
         }
         finally {
           IOUtil.closeEL(dis);
         }
View Full Code Here

     * @return AMFMessage
     * @throws IOException
     * @throws ServletException
     */
    private AMFMessage processMessage(HttpServlet servlet, HttpServletRequest req, HttpServletResponse rsp, AMFMessage message)  {
        AMFMessage responseMessage = new AMFMessage();
        for (Iterator bodies = message.getBodies(); bodies.hasNext();) {
            AMFBody requestBody = (AMFBody) bodies.next();
            // invoke
            Object serviceResult = invokeBody(servlet,req, rsp, requestBody);
            String target = getTarget(requestBody, serviceResult);
            AMFBody responseBody = new AMFBody(target, "null", serviceResult);
            responseMessage.addBody(responseBody);
        }
        return responseMessage;
    }
View Full Code Here

TOP

Related Classes of org.openamf.AMFMessage

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.