class RangerIpMatcher extends RangerAbstractConditionEvaluator {

	String extractIp(final RangerAccessRequest request) {
		if(LOG.isDebugEnabled()) {
			LOG.debug("==> RangerIpMatcher.extractIp(" + request+ ")");
		}

		String ip = null;
		if (request == null) {
			LOG.debug("isMatched: Unexpected: null request object!");
		} else {
			ip = request.getClientIPAddress();
			if (ip == null) {
				LOG.debug("isMatched: Unexpected: Client ip in request object is null!");
			}
		}

		if(LOG.isDebugEnabled()) {
			LOG.debug("<== RangerIpMatcher.extractIp(" + request+ "): " + ip);
		}
		return ip;
	}

}