Package org.jboss.remoting.marshal

Examples of org.jboss.remoting.marshal.Marshaller


   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      // need to add marshaller to invocation so can be found by transport later on
      Marshaller marshaller = (Marshaller) invocation.getMetaData().getMetaData(RemotingInterceptorFactory.REMOTING,
            RemotingInterceptorFactory.MARSHALLER);

      if (marshaller != null)
      {
         client.setMarshaller(marshaller);
View Full Code Here


         if (dataType != null)
         {
            // If found data type, will get marshaller and create interceptor wrapper for it
            // and then insert into interceptor chain
            Marshaller marshaller = MarshalFactory.getMarshaller(dataType);
            MarshallInterceptor marshallInterceptor = new MarshallInterceptor(marshaller);
            interceptorList.add(marshallInterceptor);
         }

         // Now onto creating transport interceptor
View Full Code Here

      Object returnValue = null;
      int invokeCount = 0;

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

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

      if (marshaller == null)
      {
         // try by locator (in case marshaller class name specified)
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

  
   private void runHttpTest(String algo)
   throws IOException, ClassNotFoundException
   {
      String datatype = "encryptedHTTP";
      Marshaller m = MarshalFactory.getMarshaller(HTTPMarshaller.DATATYPE);
      UnMarshaller u = MarshalFactory.getUnMarshaller(HTTPUnMarshaller.DATATYPE);
      EncryptingMarshaller em =  new EncryptingMarshaller(m);
      EncryptingUnMarshaller um =  new EncryptingUnMarshaller(u);
      if(algo != null)
      {
View Full Code Here

            else
            {
               res.addHeader(HTTPMetadataConstants.REMOTING_CONTENT_TYPE, HTTPMetadataConstants.REMOTING_CONTENT_TYPE_NON_STRING);       
            }
           
            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

            {
               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

      Object returnValue = null;
      int invokeCount = 0;

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

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

      if (marshaller == null)
      {
         // try by locator (in case marshaller class name specified)
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());
            if (marshaller instanceof VersionedMarshaller)
               ((VersionedMarshaller) marshaller).write(invocationResponse, outputStream, Version.getDefaultVersion());
            else
               marshaller.write(invocationResponse, outputStream);
            outputStream.close();
         }

      }
      catch(ClassNotFoundException e)
View Full Code Here

            String responseContentType = invocationResponse == null ? requestContentType : WebUtil.getContentType(invocationResponse);
            response.setContentType(responseContentType);
            //int iContentLength = getContentLength(invocationResponse);
            //response.setContentLength(iContentLength);
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            Marshaller marshaller = getMarshaller();
            if (marshaller instanceof VersionedMarshaller)
               ((VersionedMarshaller) marshaller).write(invocationResponse, outputStream, Version.getDefaultVersion());
            else
               marshaller.write(invocationResponse, outputStream);
            retval = outputStream.toByteArray();
            response.setContentLength(retval.length);
         }

      }
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.