Package com.caucho.hessian4.io

Examples of com.caucho.hessian4.io.AbstractHessianInput


    AbstractHessianInput in;
    AbstractHessianOutput out;

    switch (header) {
    case CALL_1_REPLY_1:
      in = new HessianInput(is);
      out = new HessianOutput(os);
      break;

    case CALL_1_REPLY_2:
      in = new HessianInput(is);
      out = new Hessian2Output(os);
      break;

    case HESSIAN_2:
      in = new Hessian2Input(is);
View Full Code Here


    AbstractHessianOutput out;

    if (_isHessian2Request)
      out = new Hessian2Output(os);
    else {
      HessianOutput out1 = new HessianOutput(os);
      out = out1;

      if (_isHessian2Reply)
        out1.setVersion(2);
    }

    out.setSerializerFactory(getSerializerFactory());

    return out;
View Full Code Here

    /* (non-Javadoc)
     * @see org.jboss.netty.channel.SimpleChannelDownstreamHandler#writeRequested(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.MessageEvent)
     */
    public void writeRequested(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
    OutputStream out = OutputStreamEncoder.getOutputStream(ctx);
    HessianOutput hout = new HessianOutput(out);
    hout.writeObject(e.getMessage());
    hout.flush();
    }
View Full Code Here

    AbstractHessianOutput out;

    switch (header) {
    case CALL_1_REPLY_1:
      in = new HessianInput(is);
      out = new HessianOutput(os);
      break;

    case CALL_1_REPLY_2:
      in = new HessianInput(is);
      out = new Hessian2Output(os);
View Full Code Here

    in.completeReply();

  return value;
      }
      else
  throw new HessianProtocolException("'" + (char) code + "' is an unknown code");
    } catch (HessianProtocolException e) {
      throw new HessianRuntimeException(e);
    } finally {
      try {
  if (is != null)
View Full Code Here

    int code;
    try
    {
      if ((code = in.read()) != 'H')
      {
        throw new HessianProtocolException("'" + (char) code + "' is an unknown code");
      }
      in.read();
      in.read();
      in.readEnvelope();
      String h = in.readString();
      if (!HEADER_STRING.equals(h))
      {
        throw new HessianProtocolException("Missing headers");
      }
      int l = in.readInt();
      for (int i = 0; i < l; i++)
      {
        Integer key = in.readInt();
        Object hvalue = in.readObject();
        switch (key)
        {
       
        case ICALLBACK_ID_HEADER_KEY:
          callbackId = (Long)hvalue;
          break;
        case ICALLBACK_METHOD_HEADER_KEY:
          callbackMethod = (String) hvalue;
          break;
        case ICALLBACK_ARGS_HEADER_KEY:
          callbackArgs = (Object[]) hvalue;
          break;
        case ICALLBACK_DONE_HEADER_KEY:
          callbackDone = (Boolean) hvalue;
          break;
        case ICOMPLETED_HEADER_KEY:
          completed = (Boolean) hvalue;
          break;
        case IGROUP_HEADER_KEY:
          group = (Integer) hvalue;
          break;
        case ICALL_ID_HEADER_KEY:
          callId = (Long) hvalue;
          break;
        }
      }
      if ((code = in.read()) != 'H')
      {
        throw new HessianProtocolException("'" + (char) code + "' is an unknown code");
      }
      in.read();
      in.read();

      Object obj = null;
View Full Code Here

  {
  }

  public Object writeReplace()
  {
    return new HessianRemote(_type.getName(), _url.toString());
  }
View Full Code Here

   * Gets the serializer factory.
   */
  public SerializerFactory getSerializerFactory()
  {
    if (_serializerFactory == null)
      _serializerFactory = new SerializerFactory(_loader);

    return _serializerFactory;
  }
View Full Code Here

TOP

Related Classes of com.caucho.hessian4.io.AbstractHessianInput

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.