Code example for InetSocketAddress

Methods: getAddress

0
      String client = null;
 
      if (value instanceof InetSocketAddress)
      { 
        InetSocketAddress inetAddress = (InetSocketAddress)value;
        client = inetAddress.getAddress().isLoopbackAddress() ?
            "localhost" : 
            inetAddress.getAddress().getHostAddress();
      } 
      else 
      { 
        client = e.getValue().toString().replaceAll("[^0-9a-zA-Z_.-]", "_");
      } 
 
      _connStatsCollector = _statsCollector.createForClientConnection(client);
      _connStatsCollector.registerOutboundConnectionOpen();
      _unmergedEventsNum = 1;
    } 
 
    super.channelConnected(ctx, e);
  }