Send the id and the name to the client.

@param client The client to send to.
@param id The id to send.
@param name The name to send.
@throws IOException In case of error.
7286
private static void writeIdAndName(ClientSocket client, int id, String name) throws IOException
    {
        // New client id
        client.getOut().writeByte(id);
        // New client name
        final byte[] data = name.getBytes(NetworkMessage.CHARSET);
        client.getOut().writeByte(data.length);
        client.getOut().write(data);
    }
955349
private void writeName(String name) throws JSONException {

// If this name has already been registered, then emit its integer and
// increment its usage count.

        Kim kim = new Kim(name);
        int integer = this.namekeep.find(kim);
        if (integer != none) {
            one();
            write(integer, this.namekeep);
        } else {

// Otherwise, emit the string with Huffman encoding, and register it.

            zero();
            write(kim, this.namehuff, this.namehuffext);
            write(end, namehuff);
            this.namekeep.register(kim);
        }
    }
374098
private void putId() {
        // note: name and info may be null
        super.put("Provider.id name", String.valueOf(name));
        super.put("Provider.id version", String.valueOf(version));
        super.put("Provider.id info", String.valueOf(info));
        super.put("Provider.id className", this.getClass().getName());
    }
785904
public synchronized void register( String clientID ) throws InvalidClientIDException
    {
        if (!clientIDs.add(clientID))
        {
            log.error("Client ID already exists : "+clientID);
            throw new InvalidClientIDException("Client ID already exists : "+clientID);
        }
        log.debug("Registered clientID : "+clientID);
    }
268892
public void setClient(String client) {
        if (meta == null) {
            meta = new EventMeta();
        }
        meta.setClient(client);
    }
468240
public void sendDeleteRequest(String id) {
		OutputStreamWriter writer = null;
		try {
			String deleteRequest = "CMD=Delete&RID=" + id;
			URLConnection serviceConnection = setQBlastServiceProperties(serviceUrl.openConnection());
			writer = new OutputStreamWriter(serviceConnection.getOutputStream());
			writer.write(deleteRequest);
			writer.flush();
		} catch (IOException ignore) {
			// ignore it this is an optional operation
		} finally {
			IOUtils.close(writer);
		}
	}
1316563
@Override
    public void setName(final String name) {
        for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) {
            additionalDescriptors.setName(name);
        }
    }
771828
private void writeName(String name)
		throws IOException
	{
		if(shouldOutputName())
		{
			out.write(TAG_KEY);
			writeStringNoTag(name);
		}
	}
357279
public void commit() throws IOException, AppPlatformException {
        final Map<String, Object> params = toMap();
        params.remove("id");

        client.post(getUri(), params);
    }
893488
public void updateClientId(String clientId) {
        if (configForVM != null) {
            configForVM.withClientId(clientId);
        } else {
            configForAppService.withClientId(clientId);
        }
    }
614086
public final synchronized void removeId(long id)
	{
		if (tc.isEntryEnabled()) Tr.entry(tc, "removeId", new Long(id));

		_idMap.remove(id);

		if (tc.isEntryEnabled()) Tr.exit(tc, "removeId");
	}
944722
public void addObjectId( IdKey id, Object instance ) {
        if ( null == idToObject ) {
            idToObject = new HashMap<IdKey, Object>();
        }
        idToObject.put( id, instance );
    }
651273
public void setName(String name) throws IOException {
    if (failException != null) {
      throw failException;
    }

    if (name == null || name.length() == 0) {
      return;
    }

    sessionInfo.name = name;

    SessionInfo newInfo = new SessionInfo(sessionInfo);
    cmNotifier.addCall(
      new ClusterManagerService.sessionUpdateInfo_args(sessionId, newInfo));
  }
871952
protected Client getClient(String id) throws IOException {
        Get get = new Get.Builder(getIndexName(), id).type("client").build(); //$NON-NLS-1$
        JestResult result = getClient().execute(get);
        if (result.isSucceeded()) {
            Client client = result.getSourceAsObject(Client.class);
            return client;
        } else {
            return null;
        }
    }
179158
public void delete(int id) {
        String url = WxEndpoint.get("url.tag.delete");
        String json = JsonMapper.nonEmptyMapper().toJson(new TagWrapper(id));
        logger.debug("delete tag: {}", json);
        wxClient.post(url, json);
    }
477728
private void updateConnected() throws IOException
    {
        byte cid = in.readByte();
        // Ensure the client id is the same
        if (cid != clientId)
        {
            return;
        }
        for (final ConnectionListener listener : listeners)
        {
            listener.notifyConnectionEstablished(Byte.valueOf(clientId), clientName);
        }
        // Read the client list
        final int clientsNumber = in.readByte();
        for (int i = 0; i < clientsNumber; i++)
        {
            cid = in.readByte();
            final String cname = readString();
            for (final ConnectionListener listener : listeners)
            {
                listener.notifyClientConnected(Byte.valueOf(cid), cname);
            }
        }
        // Message of the day if has
        if (in.available() > 0)
        {
            final String motd = readString();
            for (final ConnectionListener listener : listeners)
            {
                listener.notifyMessageOfTheDay(motd);
            }
        }
        // Send the last answer
        out.write(NetworkMessageSystemId.CONNECTED);
        out.write(clientId);
        out.flush();
        Verbose.info("Client: Connected to the server !");
    }
120392
private void setupClient(final AbstractHttpClient client) {
		this.client.addResponseInterceptor(new HttpResponseInterceptor() {
			@Override
			public void process(final HttpResponse response, final HttpContext context)
					throws HttpException, IOException {
				Header header = response.getFirstHeader("Location");
				if (header!=null)
					context.setAttribute("Location", header.getValue());
			}
		});
	}