Package connection

Examples of connection.ClientConnection


  public void execute(ClientConnection connection, ObjectInputStream is,
      ObjectOutputStream os) throws IOException, ClassNotFoundException
  {
    int clientId = is.readInt();

    ClientConnection client = getConnectionManager().getClientById(clientId);
    if (client == null)
    {
      throw new IOException();
    }

    os.write(ClientServerProtocol.PROTOCOL_LINK);
    os.write(ClientServerProtocol.Link.OP_ADDRESS);
    os.writeInt(clientId);
    os.writeObject(new InetSocketAddress(client.getAddress(), client.getPort()));
  }
View Full Code Here


    }
  }

  public FileSource asSource()
  {
    ClientConnection client = getConnectionManager().getClientById(clientId);
    if (client == null)
    {
      return null;
    }

    return new FileSource(clientId, new InetSocketAddress(client.getAddress(), client
        .getPort()));
  }
View Full Code Here

    if (query == null)
    {
      return;
    }

    ClientConnection client = getConnectionManager().getClientById(
        query.getQuerierId());
    if (client == null)
    {
      return;
    }

    client.sendSearchResults(query.getQuerierCookie(), results);
  }
View Full Code Here

TOP

Related Classes of connection.ClientConnection

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.