Package com.caucho.hessian4.io

Examples of com.caucho.hessian4.io.HessianDebugState$State


    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

    @Override
    public CompletionContext<State> buildContext(
        SelectionModel selection, DocumentParser parser) {
      JsonArray<Token> tokens = JsonCollections.createArray();
      State state = TestUtils.createMockState();
      tokens.add(new Token(null, NULL, ""));
      ParseResult<State> parseResult = new ParseResult<State>(tokens, state) {};
      return buildContext(
          new ParseUtils.ExtendedParseResult<State>(parseResult, ParseUtils.Context.IN_CODE));
    }
View Full Code Here

   * @param anchorToUpdate the optional anchor that this method will update
   */
  private boolean parseImplCm2(Line line, int lineNumber, int numLinesToProcess,
      @Nullable Anchor anchorToUpdate, ParsedTokensRecipient tokensRecipient) {

    State parserState = loadParserStateForBeginningOfLine(line);
    if (parserState == null) {
      return false;
    }

    Line previousLine = line.getPreviousLine();

    for (int numLinesProcessed = 0; line != null && numLinesProcessed < numLinesToProcess;) {
      State stateToSave = parserState;
      if (line.getText().length() > LINE_LENGTH_LIMIT) {
        // Save the initial state instead of state at the end of line.
        stateToSave = parserState.copy(codeMirrorParser);
      }

View Full Code Here

TOP

Related Classes of com.caucho.hessian4.io.HessianDebugState$State

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.