Package com.caucho.hessian.io

Examples of com.caucho.hessian.io.Hessian2Output


        minor = isToUse.read();
        if (major != 0x02) {
          throw new IOException("Version " + major + "." + minor + " is not understood");
        }
        in = new Hessian2Input(isToUse);
        out = new Hessian2Output(osToUse);
        in.readCall();
      }
      else if (code == 'C') {
        // Hessian 2.0 call... for some reason not handled in HessianServlet!
        isToUse.reset();
        in = new Hessian2Input(isToUse);
        out = new Hessian2Output(osToUse);
        in.readCall();
      }
      else if (code == 'c') {
        // Hessian 1.0 call
        major = isToUse.read();
        minor = isToUse.read();
        in = new HessianInput(isToUse);
        if (major >= 2) {
          out = new Hessian2Output(osToUse);
        }
        else {
          out = new HessianOutput(osToUse);
        }
      }
View Full Code Here


    AbstractHessianOutput out = null;
    int major = in.read();
    int minor = in.read();
    if (major >= 2) {
      out = new Hessian2Output(osToUse);
    }
    else {
      out = new HessianOutput(osToUse);
    }
    if (this.serializerFactory != null) {
View Full Code Here

public class HessianObjectOutput implements CougarObjectOutput {

  private Hessian2Output hessian2Output;

  HessianObjectOutput(OutputStream wrapped, SerializerFactory factory) {
    hessian2Output = new Hessian2Output(wrapped);
        hessian2Output.setSerializerFactory(factory);
  }
View Full Code Here

    public String getName() {
        return "Hessian2";
    }

    public void serialize(Object data, OutputStream outputStream) throws IOException {
        Hessian2Output hession2Output = new Hessian2Output(outputStream);

        hession2Output.writeObject(data);
        hession2Output.close();
    }
View Full Code Here

  public AbstractHessianOutput getHessianOutput(OutputStream os)
  {
    AbstractHessianOutput out;

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

      if (_isHessian2Reply)
View Full Code Here

    StoreConnection conn = null;
   
    try {
      TempOutputStream os = new TempOutputStream();
     
      Hessian2Output out = new Hessian2Output(os);
      out.writeObject(payload);
      out.close();
   
      conn = getConnection();

      PreparedStatement sendStmt = conn.prepareSend();
View Full Code Here

     
      SelfEncryptedCookie cookieObj
  = new SelfEncryptedCookie(cookie, createTime);

      TempOutputStream tos = new TempOutputStream();
      Hessian2Output hOut = new Hessian2Output(tos);

      hOut.writeObject(cookieObj);

      hOut.close();

      TempOutputStream cipherOut = new TempOutputStream();
      CipherOutputStream cOut
  = new CipherOutputStream(cipherOut, cipher);
View Full Code Here

      dOut = new HessianDebugOutputStream(_os, log, Level.FINEST);
      dOut.startStreaming();
      _os = dOut;
    }
     
    _out = new Hessian2Output(_os);
  }
View Full Code Here

   * Sends a message to a given jid
   */
  public void message(String to, String from, Serializable value)
  {
    try {
      Hessian2Output out = _out;

      if (out != null) {
        if (log.isLoggable(Level.FINER)) {
          log.finer(this + " message " + value
                    + " {to:" + to + ", from:" + from + "}");
        }

        synchronized (out) {
          out.startPacket();
          out.writeInt(HmtpPacketType.MESSAGE.ordinal());
          out.writeString(to);
          out.writeString(from);
          out.writeObject(value);
          out.endPacket();
 
          if (_isAutoFlush)
            out.flush();
        }
      }
    } catch (IOException e) {
      close();
     
View Full Code Here

         String from,
         Serializable value,
         ActorError error)
  {
    try {
      Hessian2Output out = _out;

      if (out != null) {
  if (log.isLoggable(Level.FINER)) {
    log.finer(this + " messageError " + value
        + " {to:" + to + ", from:" + from + "}");
  }

  synchronized (out) {
    out.startPacket();
    out.writeInt(HmtpPacketType.MESSAGE_ERROR.ordinal());
    out.writeString(to);
    out.writeString(from);
    out.writeObject(value);
    out.writeObject(error);
    out.endPacket();
 
    if (_isAutoFlush)
      out.flush();
  }
      }
    } catch (IOException e) {
      close();
     
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.