Package org.jboss.remoting.marshal

Examples of org.jboss.remoting.marshal.UnMarshaller


/*     */     try
/*     */     {
/* 199 */       Object invocationResponse = null;
/*     */
/* 201 */       ServletInputStream inputStream = request.getInputStream();
/* 202 */       UnMarshaller unmarshaller = getUnMarshaller();
/* 203 */       Object obj = null;
/* 204 */       if ((unmarshaller instanceof VersionedUnMarshaller))
/* 205 */         obj = ((VersionedUnMarshaller)unmarshaller).read(new ByteArrayInputStream(requestByte), metadata, Version.getDefaultVersion());
/*     */       else
/* 207 */         obj = unmarshaller.read(new ByteArrayInputStream(requestByte), metadata);
/* 208 */       inputStream.close();
/*     */
/* 210 */       boolean isError = false;
/* 211 */       InvocationRequest invocationRequest = null;
/*     */
View Full Code Here


/*     */     try
/*     */     {
/* 223 */       log.debug("Get locator for: " + endpoint);
/*     */
/* 225 */       Marshaller marshaller = getMarshaller();
/* 226 */       UnMarshaller unmarshaller = getUnmarshaller();
/*     */
/* 238 */       String version = getRemotingVersion();
/* 239 */       if (version.startsWith("1.4"))
/*     */       {
/* 241 */         targetAddress = addURLParameter(targetAddress, "datatype", "JBossWSMessage");
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)
      {
         em.setCipherAlgorithm(algo);
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)
      {
         em.setCipherAlgorithm(algo);
View Full Code Here

         PatternLayout layout = new PatternLayout(pattern);
         ConsoleAppender consoleAppender = new ConsoleAppender(layout);
         Logger.getRootLogger().addAppender(consoleAppender);
        
         Marshaller marshaller = new CompressingMarshaller(new HTTPMarshaller());
         UnMarshaller unmarshaller = new CompressingUnMarshaller(new HTTPUnMarshaller());
         MarshalFactory.addMarshaller("compressedHttp", marshaller, unmarshaller);
        
         StringBuffer sb = new StringBuffer();
         for (int i = 0; i < 200; i++)
         {
View Full Code Here

      {
         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)
         marshaller = MarshalFactory.getMarshaller(getLocator(), getClassLoader());
         if (marshaller == null)
         {
            // need to have a marshaller, so create a default one
            marshaller = MarshalFactory.getMarshaller(getDataType(), getSerializationType());
            if (marshaller == null)
            {
               // went as far as possible to find a marshaller, will have to give up
               throw new InvalidMarshallingResource("Can not find a valid marshaller for data type: " + getDataType());
            }
         }
      }

      // creating a new classloader containing the remoting class loader (for remote classloading) and
      // the current thread's class loader.  This allows to load remoting classes as well as user's classes.
      ClassLoader remotingClassLoader = new RemotingClassLoader(getClassLoader(),
                                                                Thread.currentThread().getContextClassLoader());

      if (unmarshaller == null)
      {
         // try by locator (in case unmarshaller class name specified)
         unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), getClassLoader());
         if (unmarshaller == null)
         {
            unmarshaller = MarshalFactory.getUnMarshaller(getDataType(), getSerializationType());
            if (unmarshaller == null)
            {
               // went as far as possible to find a unmarshaller, will have to give up
               throw new InvalidMarshallingResource("Can not find a valid unmarshaller for data type: " + getDataType());
            }
         }
         unmarshaller.setClassLoader(remotingClassLoader);
      }

      // if raw, then send only param of invocation request
      Object payload = null;
      Map metadata = invocationReq.getRequestPayload();
View Full Code Here

      return request;
   }

   public UnMarshaller getUnMarshaller()
   {
      UnMarshaller unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), this.getClass().getClassLoader());
      if(unmarshaller == null)
      {
         unmarshaller = MarshalFactory.getUnMarshaller(getDataType(), getSerializationType());
      }
      return unmarshaller;
View Full Code Here

            {
               request = createNewInvocationRequest(metadata, null);
            }
            else // must be POST or PUT
            {
               UnMarshaller unmarshaller = getUnMarshaller();
               Object obj = unmarshaller.read(dataInput, metadata);


               if(obj instanceof InvocationRequest)
               {
                  request = (InvocationRequest) obj;
View Full Code Here

         case Version.VERSION_1:
         case Version.VERSION_2:
         {

            //TODO: -TME Need better way to get the unmarshaller (via config)
            UnMarshaller unmarshaller = MarshalFactory.getUnMarshaller(invoker.getLocator(), classLoader);
            if (unmarshaller == null)
            {
               unmarshaller = MarshalFactory.getUnMarshaller(invoker.getDataType(), invoker.getSerializationType());
            }
            return unmarshaller.read(inputStream, null);
         }
         default:
         {
            throw new IOException("Can not read data for version " + version + ".  Supported versions: " + Version.VERSION_1 + "," + Version.VERSION_2);
         }
View Full Code Here

            {
               invocationRequest = createNewInvocationRequest(request, response, null);
            } else
            {
               // must be POST or PUT
               UnMarshaller unmarshaller = getUnMarshaller();
               Object obj = unmarshaller.read(request.getInputStream(), request);
               if (obj instanceof InvocationRequest)
               {
                  invocationRequest = (InvocationRequest) obj;
                  if (invocationRequest.getReturnPayload() == null)
                  {
View Full Code Here

TOP

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

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.