Package org.jboss.remoting.serialization

Examples of org.jboss.remoting.serialization.SerializationManager


    */
   public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException
   {
      GZIPInputStream gzis = new GZIPInputStream(inputStream);
      BufferedInputStream bis = new BufferedInputStream(gzis);
      SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
      ObjectInputStream ois =  manager.createInput(bis, getClassLoader());

      if(wrappedUnMarshaller != null)
      {
         if (wrappedUnMarshaller instanceof VersionedUnMarshaller)
            return ((VersionedUnMarshaller)wrappedUnMarshaller).read(ois, metadata, version);
View Full Code Here


   public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException
  
      if(cipher == null)
         throw new IllegalStateException("Cipher is null for algo="+ this.cipherAlgorithm);
      CipherInputStream cis = new CipherInputStream(inputStream,cipher);
      SerializationManager sm = SerializationStreamFactory.getManagerInstance(getSerializationType());
      ObjectInputStream ois = sm.createRegularInput(cis);
      
      Object obj = null;
      if(wrappedUnMarshaller != null)
      {
         if (wrappedUnMarshaller instanceof VersionedUnMarshaller)
View Full Code Here

    */
   public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException
   {
      GZIPInputStream gzis = new GZIPInputStream(inputStream);
      BufferedInputStream bis = new BufferedInputStream(gzis);
      SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
      ObjectInputStream ois =  manager.createInput(bis, getClassLoader());

      if(wrappedUnMarshaller != null)
      {
         // HACK for JBREM-927.
         if (wrappedUnMarshaller instanceof HTTPUnMarshaller)
View Full Code Here

      //EOS intercepts the close() call and does not close the stream
      EncryptionOutputStream eos = new EncryptionOutputStream(output);
      
      CipherOutputStream cos = new CipherOutputStream(eos, cipher);
      
      SerializationManager sm = SerializationStreamFactory.getManagerInstance(getSerializationType());
      ObjectOutputStream oos = sm.createOutput(cos);
     
      if(wrappedMarshaller != null)
      {
         if (wrappedMarshaller instanceof VersionedMarshaller)
            ((VersionedMarshaller) wrappedMarshaller).write(dataObject, oos, version);
View Full Code Here

   public Object read(InputStream inputStream, Map metadata, int version) throws IOException, ClassNotFoundException
  
      if(cipher == null)
         throw new IllegalStateException("Cipher is null for algo="+ this.cipherAlgorithm);
      CipherInputStream cis = new CipherInputStream(inputStream,cipher);
      SerializationManager sm = SerializationStreamFactory.getManagerInstance(getSerializationType());
      ObjectInputStream ois = sm.createRegularInput(cis);
      
      Object obj = null;
      if(wrappedUnMarshaller != null)
      {
         if (wrappedUnMarshaller instanceof VersionedUnMarshaller)
View Full Code Here

         return inputStream;
      }
      else
      {
         BufferedInputStream bis = new BufferedInputStream(inputStream);
         SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
         return manager.createInput(bis, getClassLoader());
      }
     
   }
View Full Code Here

         return outputStream;
      }
      else
      {
         BufferedOutputStream bos = new BufferedOutputStream(outputStream);
         SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
         ObjectOutputStream oos = manager.createOutput(bos);
         oos.flush();
         return oos;
      }
   }
View Full Code Here

            ByteArrayInputStream is = null;
            if (rmiOnewayMarshalling)
            {
               // Legacy treatment, pre 2.4.0
               ByteArrayOutputStream baos = new ByteArrayOutputStream();
               SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
               ObjectOutputStream oos = manager.createOutput(baos);
               oos.writeObject(payload);
               oos.flush();
               oos.close();
               is = new ByteArrayInputStream(baos.toByteArray());
            }
View Full Code Here

              
               if (rmiOnewayMarshalling)
               {
                  // Legacy treatment, pre 2.4.0.
                  ByteArrayInputStream bais = new ByteArrayInputStream(byteOut.toByteArray());
                  SerializationManager manager = SerializationStreamFactory.getManagerInstance(getSerializationType());
                  ObjectInputStream ois = manager.createInput(bais, getClassLoader());

                  try
                  {
                     byteOut.close();
                     payload = ois.readObject();
View Full Code Here

   protected InvocationRequest marshallInvocation(InvocationRequest localInvocation) throws IOException, ClassNotFoundException
   {
      final Object param = localInvocation.getParameter();
      Object newParam = null;
      String serializationType = getSerializationType();
      final SerializationManager manager = SerializationStreamFactory.getManagerInstance(serializationType);

      if (serializationType.indexOf("jboss") < 0 || SecurityUtility.skipAccessControl())
      {
         newParam = manager.createMarshalledValueForClone(param).get();
      }
      else
      {
         try
         {
            newParam = AccessController.doPrivileged( new PrivilegedExceptionAction()
            {
               public Object run() throws Exception
               {
                  return manager.createMarshalledValueForClone(param).get();
               }
            });
         }
         catch (PrivilegedActionException e)
         {
View Full Code Here

TOP

Related Classes of org.jboss.remoting.serialization.SerializationManager

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.