Package org.jboss.remoting.marshal

Examples of org.jboss.remoting.marshal.Marshaller


            {
               responseContentType = responseObject == null ? requestContentType : WebUtil.getContentType(responseObject);
            }
            response.setContentType(responseContentType);
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            Marshaller marshaller = getMarshaller();
            if (marshaller instanceof VersionedMarshaller)
               ((VersionedMarshaller) marshaller).write(responseObject, outputStream, getVersion());
            else
               marshaller.write(responseObject, outputStream);
            retval = outputStream.toByteArray();
            response.setContentLength(retval.length);
         }

      }
View Full Code Here


            {
               responseContentType = responseObject == null ? req.getContentType() : WebUtil.getContentType(responseObject);
            }
            res.setContentType(responseContentType);
           
            Marshaller marshaller = getMarshaller();
            if (marshaller instanceof VersionedMarshaller)
               ((VersionedMarshaller) marshaller).write(responseObject, response.getOutputStream(), version);
            else
               marshaller.write(responseObject, response.getOutputStream());
            return;
         }
         default:
         {
            throw new IOException("Can not send response due to version (" + version + ") not being supported.  Supported versions: " + Version.VERSION_1 + ", " + Version.VERSION_2 + ", " + Version.VERSION_2_2);
View Full Code Here

   }

   public Marshaller getMarshaller()
   {
      ClassLoader classLoader = getClassLoader(WebServerInvoker.class);
      Marshaller marshaller = MarshalFactory.getMarshaller(getLocator(), classLoader, configuration);
      if(marshaller == null)
      {
         marshaller = MarshalFactory.getMarshaller(getDataType(), getSerializationType());
      }
      return marshaller;
View Full Code Here

         {
            serializationType = serializationTypeParam;
         }
      }

      Marshaller marshaller = null;
      UnMarshaller unmarshaller = null;
      int tempTimeout = -1;
      int savedTimeout = getTimeout();
     
      if (metadata != null)
View Full Code Here

            {
               responseContentType = responseObject == null ? req.getContentType() : WebUtil.getContentType(responseObject);
            }
            res.setContentType(responseContentType);
           
            Marshaller marshaller = getMarshaller();
            if (marshaller instanceof VersionedMarshaller)
               ((VersionedMarshaller) marshaller).write(responseObject, response.getOutputStream(), version);
            else
               marshaller.write(responseObject, response.getOutputStream());
            return;
         }
         default:
         {
            throw new IOException("Can not send response due to version (" + version + ") not being supported.  Supported versions: " + Version.VERSION_1 + ", " + Version.VERSION_2 + ", " + Version.VERSION_2_2);
View Full Code Here

      int invokeCount = 0;

      if (trace) { log.trace(this + "(" + (++invokeCount) + ") invoking " + invocationReq); }

      // Set up marshaller and unmarshaller.
      Marshaller marshaller = null;
      UnMarshaller unmarshaller = null;
      RemotingClassLoader rcl = null;
      synchronized (MicroRemoteClientInvoker.class)
      {
         marshaller = getMarshaller();
View Full Code Here

      if(log.isTraceEnabled())
      {
         log.trace((++invokeCount) + ") invoking =>" + invocationReq + " with parameter: " + invocationReq.getParameter());
      }

      Marshaller marshaller = getMarshaller();
      UnMarshaller unmarshaller = getUnMarshaller();

      if(marshaller == null)
      {
         // try by locator (in case marshaller class name specified)
View Full Code Here

         resp = ex;
      }

      Thread.interrupted(); // clear interrupted state so we don't fail on socket writes

      Marshaller marshaller = MarshalFactory.getMarshaller(invoker.getLocator(), this.getClass().getClassLoader());

      if(marshaller == null)
      {
         marshaller = MarshalFactory.getMarshaller(invoker.getDataType(), invoker.getSerializationType());
      }

//      marshaller.write(resp, socketWrapper.getOutputStream(serializationType));
      marshaller.write(resp, socketWrapper.getOutputStream());

      handlingResponse = false;
   }
View Full Code Here

            if(responseObject != null)
            {
               String responseContentType = responseObject == null ? req.getContentType() : WebUtil.getContentType(responseObject);
               res.setContentType(responseContentType);
               Marshaller marshaller = getMarshaller();
               marshaller.write(responseObject, response.getOutputStream());
            }

         }

         response.outputBuffer.close();
View Full Code Here

         {
            response.setContentType(requestContentType);
            int iContentLength = getContentLength(invocationResponse);
            response.setContentLength(iContentLength);
            ServletOutputStream outputStream = response.getOutputStream();
            Marshaller marshaller = MarshalFactory.getMarshaller(HTTPMarshaller.DATATYPE, getSerializationType());
            marshaller.write(invocationResponse, outputStream);
            outputStream.close();
         }

      }
      catch(ClassNotFoundException e)
View Full Code Here

TOP

Related Classes of org.jboss.remoting.marshal.Marshaller

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.