Package com.caucho.vfs

Examples of com.caucho.vfs.ReadWritePair


      throws IOException
    {
      try {
        Path path = _path.lookup(uri);

        ReadWritePair pair = path.openReadWrite();

        if (pair != null) {
          synchronized (this) {
            _connectionCount++;
          }
View Full Code Here


      throw e;
    }

    try {
      ReadWritePair pair = openTCPPair();
      ReadStream rs = pair.getReadStream();
      rs.setEnableReadTime(true);
     
      rs.setAttribute("timeout", new Integer((int) _loadBalanceSocketTimeout));

      _activeCount.incrementAndGet();
     
      _connectCountTotal.incrementAndGet();

      ClientSocket stream = new ClientSocket(this, _streamCount++,
                                               rs, pair.getWriteStream());

      if (log.isLoggable(Level.FINER))
        log.finer("connect " + stream);

      if (_firstSuccessTime <= 0) {
View Full Code Here

  public SubversionClient(String host, int port)
    throws IOException
  {
    _path = Vfs.lookup("tcp://" + host + ":" + port);

    ReadWritePair pair = _path.openReadWrite();

    _is = pair.getReadStream();
    _os = pair.getWriteStream();

    _in = new SubversionInput(_is);

    readHello();
View Full Code Here

  }

  public static ReadWritePair openReadWrite(Path p)
    throws IOException
  {
    ReadWritePair s = p.openReadWrite();
    Exit.addExit(exitStream, s);
    return s;
  }
View Full Code Here

  }

  private ReadStream sendRequest(String methodName, Object []args)
    throws IOException
  {
    ReadWritePair pair = _path.openReadWrite();

    ReadStream is = pair.getReadStream();
    WriteStream os = pair.getWriteStream();

    try {
      Hessian2Output out = new Hessian2Output(os);
     
      out.writeVersion();
View Full Code Here

      = context.getOptions().get(env.createStringOld(path.getScheme()));

    String method = options.get(env.createStringOld("method")).toString();
   
    if (method.equals("POST")){
      ReadWritePair pair = path.openReadWrite();
      _is = pair.getReadStream();
      _os = pair.getWriteStream();
    }
    else
      _is = path.openRead();
   
    _httpStream = (HttpStreamWrapper) _is.getSource();
View Full Code Here

      = context.getOptions().get(env.createString(path.getScheme()));

    String method = options.get(env.createString("method")).toString();
   
    if (method.equals("POST")){
      ReadWritePair pair = path.openReadWrite();
      _is = pair.getReadStream();
      _os = pair.getWriteStream();
    }
    else
      _is = path.openRead();
   
    _httpStream = (HttpStreamWrapper) _is.getSource();
View Full Code Here

      throws IOException
    {
      try {
  Path path = _path.lookup(uri);

  ReadWritePair pair = path.openReadWrite();

  if (pair != null) {
    synchronized (this) {
      _connectionCount++;
    }
View Full Code Here

      throw e;
    }

    try {
      ReadWritePair pair = openTCPPair();
      ReadStream rs = pair.getReadStream();
      rs.setAttribute("timeout", new Integer((int) _loadBalanceSocketTimeout));

      synchronized (this) {
        _activeCount++;
        _connectCountTotal++;
      }

      ClientSocket stream = new ClientSocket(this, _streamCount++,
                                               rs, pair.getWriteStream());

      if (log.isLoggable(Level.FINER))
        log.finer("connect " + stream);

      if (_firstSuccessTime <= 0) {
View Full Code Here

  }

  public static ReadWritePair openReadWrite(Path p)
    throws IOException
  {
    ReadWritePair s = p.openReadWrite();
    Exit.addExit(exitStream, s);
    return s;
  }
View Full Code Here

TOP

Related Classes of com.caucho.vfs.ReadWritePair

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.