/** Set the default parameters for this URI. * Do nothing if the parameter is already set to some value. * Otherwise set it to the given value. * @param name Name of the parameter to set. * @param value value of the parameter to set. */ public void setDefaultParm(String name, Object value) { if (uriParms.getValue(name) == null) { NameValue nv = new NameValue(name, value); uriParms.set(nv); } }
/** * Set the MADDR parameter . * @param mAddr Host Name to set */ public void setMAddr(String mAddr) { NameValue nameValue = uriParms.getNameValue(MADDR); Host host = new Host(); host.setAddress(mAddr); if (nameValue != null) nameValue.setValueAsObject(host); else { nameValue = new NameValue(MADDR, host); uriParms.set(nameValue); } }
public boolean isLoggingEnabled() { return logger().isLoggingEnabled(); }
protected ParametersHeader(String hdrName) { super(hdrName); this.parameters = new NameValueList(); this.duplicates = new DuplicateNameValueList(); }
protected void consumeDomainLabel() throws ParseException { if (debug) dbg_enter("domainLabel"); try { lexer.consumeValidChars(VALID_DOMAIN_LABEL_CHAR); } finally { if (debug) dbg_leave("domainLabel"); } }
/** Returns the value of the <code>maddr</code> parameter, or null if this * is not set. This is equivalent to getParameter("maddr"). * * @return the value of the <code>maddr</code> parameter */ public String getMAddrParam() { NameValue maddr = uriParms.getNameValue(MADDR); if (maddr == null) return null; String host = (String) maddr.getValueAsObject(); return host; }
public int getLineCount() { return logger().getLineCount(); }
protected ParametersHeader(String hdrName, boolean sync) { super(hdrName); this.parameters = new NameValueList(sync); this.duplicates = new DuplicateNameValueList(); }
/** Sets the value of the specified header fields to be included in a * request constructed from the URI. If the header already had a value it * will be overwritten. * * @param name - a String specifying the header name * @param value - a String specifying the header value */ public void setHeader(String name, String value) { NameValue nv = new NameValue(name, value); qheaders.set(nv); }
protected ParametersHeader() { this.parameters = new NameValueList(); this.duplicates = new DuplicateNameValueList(); }
/** * Set a given URI parameter. Note - parameter must be properly * encoded before the function is called. * @param name Name of the parameter to set. * @param value value of the parameter to set. */ public void setUriParm(String name, Object value) { NameValue nv = new NameValue(name, value); uriParms.set(nv); }