Package com.caucho.hessian4.io

Examples of com.caucho.hessian4.io.AnnotationDeserializer


  dIs.startTop2();
 
  is = dIs;
      }

      AbstractHessianInput in;

      int code = is.read();

      if (code == 'H') {
  int major = is.read();
  int minor = is.read();

  in = _factory.getHessian2Input(is);

  Object value = in.readReply(method.getReturnType());

  return value;
      }
      else if (code == 'r') {
  int major = is.read();
  int minor = is.read();
 
  in = _factory.getHessianInput(is);

  in.startReplyBody();

  Object value = in.readObject(method.getReturnType());

  if (value instanceof InputStream) {
    value = new ResultInputStream(conn, is, in, (InputStream) value);
    is = null;
    conn = null;
  }
  else
    in.completeReply();

  return value;
      }
      else
  throw new HessianProtocolException("'" + (char) code + "' is an unknown code");
View Full Code Here


      _conn = null;
     
      InputStream connIs = _connIs;
      _connIs = null;
     
      AbstractHessianInput in = _in;
      _in = null;
     
      InputStream hessianIs = _hessianIs;
      _hessianIs = null;

      try {
  if (hessianIs != null)
    hessianIs.close();
      } catch (Exception e) {
  log.log(Level.FINE, e.toString(), e);
      }

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

    return getHessian2Input(is);
  }

  public AbstractHessianInput getHessian1Input(InputStream is)
  {
    AbstractHessianInput in;

    if (_isDebug)
      is = new HessianDebugInputStream(is, new PrintWriter(System.out));

    in = new HessianInput(is);

    in.setRemoteResolver(getRemoteResolver());

    in.setSerializerFactory(getSerializerFactory());

    return in;
  }
View Full Code Here

    return in;
  }

  public AbstractHessianInput getHessian2Input(InputStream is)
  {
    AbstractHessianInput in;

    if (_isDebug)
      is = new HessianDebugInputStream(is, new PrintWriter(System.out));

    in = new Hessian2Input(is);

    in.setRemoteResolver(getRemoteResolver());

    in.setSerializerFactory(getSerializerFactory());

    return in;
  }
View Full Code Here

      os = dOs;
    }

    HessianInputFactory.HeaderType header = _inputFactory.readHeader(is);

    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);
      in.readCall();
      out = new Hessian2Output(os);
      break;

    default:
      throw new IllegalStateException(header + " is an unknown Hessian call");
    }

    if (serializerFactory != null) {
      in.setSerializerFactory(serializerFactory);
      out.setSerializerFactory(serializerFactory);
    }

    try {
      invoke(_service, in, out);
    } finally {
      in.close();
      out.close();

      if (isDebug)
        os.close();
    }
View Full Code Here

  HessianDebugOutputStream dOs = new HessianDebugOutputStream(os, dbg);
  dOs.startTop2();
  os = dOs;
      }
     
      AbstractHessianOutput out = _factory.getHessianOutput(os);

      out.call(methodName, args);
      out.flush();

      conn.sendRequest();

      isValid = true;
View Full Code Here

    return in;
  }

  public AbstractHessianOutput getHessianOutput(OutputStream os)
  {
    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

    }

    HessianInputFactory.HeaderType header = _inputFactory.readHeader(is);

    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);
      in.readCall();
      out = new Hessian2Output(os);
      break;

    default:
      throw new IllegalStateException(header + " is an unknown Hessian call");
    }

    if (serializerFactory != null) {
      in.setSerializerFactory(serializerFactory);
      out.setSerializerFactory(serializerFactory);
    }

    try {
      invoke(_service, in, out);
    } finally {
      in.close();
      out.close();

      if (isDebug)
        os.close();
    }
  }
View Full Code Here

    AbstractHessianInput in;

    if (_isDebug)
      is = new HessianDebugInputStream(is, new PrintWriter(System.out));

    in = new Hessian2Input(is);

    in.setRemoteResolver(getRemoteResolver());

    in.setSerializerFactory(getSerializerFactory());
View Full Code Here

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

    case HESSIAN_2:
      in = new Hessian2Input(is);
      in.readCall();
      out = new Hessian2Output(os);
      break;

    default:
View Full Code Here

TOP

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

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.