Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.Hessian2Output


  {
    if (log.isLoggable(Level.FINEST)) {
      os = new HessianDebugOutputStream(os, log, Level.FINEST);
    }
   
    _out = new Hessian2Output(os);
    _out.setSerializerFactory(factory);
  }
View Full Code Here


  }

  @Override
  public void close()
  {
    Hessian2Output out = _out;
    _out = null;

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

  private HashMap<String,Integer> _addressCache = new HashMap<String,Integer>(256);
  private String []_addressCacheRing = new String[256];

  public HmtpWriter()
  {
    _out = new Hessian2Output();
   
    if (log.isLoggable(Level.FINEST)) {
      _dOut = new HessianDebugOutputStream(log, Level.FINEST);
    }
  }
View Full Code Here

                      Serializable payload)
    throws IOException
  {
    init(os);

    Hessian2Output out = _out;

    if (out == null)
      return;

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

    out.writeInt(HmtpPacketType.MESSAGE.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeObject(payload);

    out.flushBuffer();
  }
View Full Code Here

                           BamError error)
    throws IOException
  {
    init(os);
   
    Hessian2Output out = _out;
   
    if (out == null)
      return;

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

    out.writeInt(HmtpPacketType.MESSAGE_ERROR.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeObject(value);
    out.writeObject(error);
   
    out.flushBuffer();
  }
View Full Code Here

                    Serializable value)
    throws IOException
  {
    init(os);
   
    Hessian2Output out = _out;

    if (out == null)
      return;

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

    out.writeInt(HmtpPacketType.QUERY.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeLong(id);
    out.writeObject(value);

    out.flushBuffer();
  }
View Full Code Here

                          Serializable value)
    throws IOException
  {
    init(os);
   
    Hessian2Output out = _out;

    if (out == null)
      return;

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

    out.writeInt(HmtpPacketType.QUERY_RESULT.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeLong(id);
    out.writeObject(value);
   
    out.flushBuffer();
  }
View Full Code Here

                         BamError error)
    throws IOException
  {
    init(os);

    Hessian2Output out = _out;

    if (out == null)
      return;

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

    out.writeInt(HmtpPacketType.QUERY_ERROR.ordinal());
    writeAddress(out, to);
    writeAddress(out, from);
    out.writeLong(id);
    out.writeObject(value);
    out.writeObject(error);
   
    out.flushBuffer();
  }
View Full Code Here

  }

  public void flush()
    throws IOException
  {
    Hessian2Output out = _out;

    if (out != null) {
      out.flush();
    }
  }
View Full Code Here

  {
    if (log.isLoggable(Level.FINER))
      log.finer(this + " close");

    try {
      Hessian2Output out = _out;
      _out = null;

      if (out != null) {
        out.close();
      }
    } catch (Exception e) {
      log.log(Level.WARNING, e.toString(), e);
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.hessian.io.Hessian2Output

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.