socketPort = sc.getSocketPort(); socketAddress = sc.getSocketAddress(); membershipID = sc.getMembershipID();
public void fillInClientInfo(Map<ClientProxyMembershipID, CacheClientStatus> allClients) { // The allClients parameter includes only actual clients (not remote // gateways). This monitor will include remote gateway connections, // so weed those out. synchronized (proxyIdConnections) { for (Map.Entry<ClientProxyMembershipID, CacheClientStatus> entry : allClients.entrySet()) { ClientProxyMembershipID proxyID = entry.getKey();// proxyID // includes FQDN CacheClientStatus cci = entry.getValue(); ServerConnectionCollection collection = proxyIdConnections.get(proxyID); Set<ServerConnection> connections = collection != null ? collection.getConnections() : null; if (connections != null) { String memberId = null; cci.setNumberOfConnections(connections.size()); List socketPorts = new ArrayList(); List socketAddresses = new ArrayList(); for (ServerConnection sc : connections) { socketPorts.add(Integer.valueOf(sc.getSocketPort())); socketAddresses.add(sc.getSocketAddress()); memberId = sc.getMembershipID(); // each ServerConnection has the // same member id } cci.setMemberId(memberId); cci.setSocketPorts(socketPorts); cci.setSocketAddresses(socketAddresses); } } } }
public Map<String, IncomingGatewayStatus> getConnectedIncomingGateways() { Map<String, IncomingGatewayStatus> connectedIncomingGateways = new HashMap<>(); synchronized (proxyIdConnections) { for (Map.Entry<ClientProxyMembershipID, ServerConnectionCollection> entry : proxyIdConnections .entrySet()) { ClientProxyMembershipID proxyID = entry.getKey(); Set<ServerConnection> connections = entry.getValue().getConnections(); for (ServerConnection sc : connections) { if (sc.getCommunicationMode().isWAN()) { IncomingGatewayStatus status = new IncomingGatewayStatus(proxyID.getDSMembership(), sc.getSocketAddress(), sc.getSocketPort()); connectedIncomingGateways.put(proxyID.getDSMembership(), status); } } } } return connectedIncomingGateways; }
if (uniqueIds.get(clientId.getDSMembership()) == null) { ClientConnInfo clientConInfo = new ClientConnInfo(conn.getProxyID(), conn.getSocketHost(), conn.getSocketPort(), false); uniqueIds.put(clientId.getDSMembership(), clientConInfo);
ClientProxyMembershipID cliIdFrmProxy = conn.getProxyID(); ClientConnInfo cci = new ClientConnInfo(conn.getProxyID(), conn.getSocketHost(), conn.getSocketPort(), flag); if (connInfo.toString().equals(cci.toString())) { return cliIdFrmProxy.getClientVersion();
int clientPort = serverConnection.getSocketPort(); if (logger.isDebugEnabled()) { logger.debug("{}: Received client ready request ({} bytes) from {} on {}:{}",
serverConnection.setClientDisconnectCleanly(); String clientHost = serverConnection.getSocketHost(); int clientPort = serverConnection.getSocketPort(); if (logger.isDebugEnabled()) { logger.debug("{}: Received close request ({} bytes) from {}:{}", serverConnection.getName(),