Examples of Hessian2Input


Examples of com.alibaba.citrus.hessian.io.Hessian2Input

            }
        }
    }

    public Object deserialize(InputStream is) throws Exception {
        Hessian2Input hi = null;

        try {
            hi = new Hessian2Input(is);
            return hi.readObject();
        } finally {
            if (hi != null) {
                try {
                    hi.close();
                } catch (IOException e) {
                }
            }
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.hessian.io.Hessian2Input

            }
        }
    }

    public Object deserialize(InputStream is) throws Exception {
        Hessian2Input hi = null;

        try {
            hi = new Hessian2Input(is);
            return hi.readObject();
        } finally {
            if (hi != null) {
                try {
                    hi.close();
                } catch (IOException e) {
                }
            }
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.hessian.io.Hessian2Input

            }
        }
    }

    public Object deserialize(InputStream is) throws Exception {
        Hessian2Input hi = null;

        try {
            hi = new Hessian2Input(is);
            return hi.readObject();
        } finally {
            if (hi != null) {
                try {
                    hi.close();
                } catch (IOException e) {
                }
            }
        }
    }
View Full Code Here

Examples of com.alibaba.com.caucho.hessian.io.Hessian2Input

      out.flushBuffer();
      os.close();
      if( i == 0 )
        len = os.toByteArray().length;
      ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
      Hessian2Input in = new Hessian2Input(is);
      assertEquals(in.readObject().getClass(), Bean.class);
    }
    System.out.println("Hessian2 write and parse 500 times in " + (System.currentTimeMillis()-now)+"ms, size " + len);
  }
View Full Code Here

Examples of com.alibaba.com.caucho.hessian.io.Hessian2Input

{
  private final Hessian2Input mH2i;

  public Hessian2ObjectInput(InputStream is)
  {
    mH2i = new Hessian2Input(is);
    mH2i.setSerializerFactory(Hessian2SerializerFactory.SERIALIZER_FACTORY);
  }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

      log.finest("session serialized load data:");
      dis.setDepth(2);
      is = dis;
    }
 
    _in = new Hessian2Input(is);
    _in.setSerializerFactory(new SerializerFactory(loader));
  }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

    return _in.readObject();
  }

  public void close()
  {
    Hessian2Input in = _in;
    _in = null;

    if (in != null) {
      try {
        in.close();
      } catch (IOException e) {
        log.log(Level.FINEST, e.toString(), e);
      }
    }
  }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

  private int _addressCacheIndex;
  private String []_addressCacheRing = new String[256];

  public HmtpReader()
  {
    _hIn = new Hessian2Input();
  }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

    throws IOException
  {
    if (actorStream == null)
      throw new IllegalStateException("HmtpReader.readPacket requires a valid ActorStream for callbacks");

    Hessian2Input hIn = _hIn;
   
    hIn.init(is);

    int type = hIn.readInt();
    String to = readAddress(hIn);
    String from = readAddress(hIn);
   
    switch (HmtpPacketType.TYPES[type]) {
    case MESSAGE:
      {
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " message " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.message(to, from, value);

        break;
      }

    case MESSAGE_ERROR:
      {
        Serializable value = (Serializable) hIn.readObject();
        BamError error = (BamError) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " messageError " + error + " " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        actorStream.messageError(to, from, value, error);

        break;
      }

    case QUERY:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " query " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.query(id, to, from, value);

        break;
      }

    case QUERY_RESULT:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " queryResult " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }

        actorStream.queryResult(id, to, from, value);

        break;
      }

    case QUERY_ERROR:
      {
        long id = hIn.readLong();
        Serializable value = (Serializable) hIn.readObject();
        BamError error = (BamError) hIn.readObject();

        if (log.isLoggable(Level.FINEST)) {
          log.finest(this + " queryError " + error + " " + value
                    + " {id:" + id + ", to:" + to + ", from:" + from + "}");
        }
View Full Code Here

Examples of com.caucho.hessian.io.Hessian2Input

          break;
        }
      }

      Hessian2Input input = new Hessian2Input(new ByteArrayInputStream(data,
                                                                       start +
                                                                       1,
                                                                       scan
                                                                         .pointer -
                                                                                  start -
                                                                                  3));

      Object obj = input.readObject();

      HttpSession session = request.getSession(true);

      session.setAttribute("caucho.jsf.developer.aid", obj);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.