Methods Summary |
---|
public java.lang.Object | clone()Clone this request.
RequestLine retval = new RequestLine();
if (this.uri != null)
retval.uri = (URI) this.uri.clone();
if (this.method != null)
retval.method = new String(this.method);
if (this.sipVersion != null)
retval.sipVersion = new String(this.sipVersion);
return (Object) retval;
|
public java.lang.String | encode()Encodes the request line as a String.
StringBuffer encoding = new StringBuffer();
if (method != null) {
encoding.append(method);
encoding.append(Separators.SP);
}
if (uri != null) {
encoding.append(uri.encode());
encoding.append(Separators.SP);
}
encoding .append(sipVersion + Separators.NEWLINE);
return encoding.toString();
|
public boolean | equals(java.lang.Object other)Compare for equality.
boolean retval;
if (! other.getClass().equals(this.getClass())) {
return false;
}
RequestLine that = (RequestLine) other;
try {
retval = this.method.equals(that.method)
&& this.uri.equals(that.uri)
&& this.sipVersion.equals(that.sipVersion);
} catch (NullPointerException ex) {
retval = false;
}
return retval;
|
public java.lang.String | getMethod()Get the Method
return method;
|
public java.lang.String | getSipVersion()Get the SIP version.
return sipVersion;
|
public URI | getUri()Gets the Request-URI.
return uri;
|
public java.lang.String | getVersionMajor()Get the major verrsion number.
if (sipVersion == null)
return null;
String major = null;
boolean slash = false;
for (int i = 0; i < sipVersion.length(); i++) {
if (sipVersion.charAt(i) == '.") break;
if (slash) {
if (major == null)
major = "" + sipVersion.charAt(i);
else major += sipVersion.charAt(i);
}
if (sipVersion.charAt(i) == '/") slash = true;
}
return major;
|
public java.lang.String | getVersionMinor()Get the minor version number.
if (sipVersion == null)
return null;
String minor = null;
boolean dot = false;
for (int i = 0; i < sipVersion.length(); i++) {
if (dot) {
if (minor == null)
minor = "" + sipVersion.charAt(i);
else minor += sipVersion.charAt(i);
}
if (sipVersion.charAt(i) == '.") dot = true;
}
return minor;
|
public void | setMethod(java.lang.String method)Set the method member
this.method = method;
|
public void | setSIPVersion(java.lang.String sipVersion)Set the SIP version.
this.sipVersion = sipVersion;
|
public void | setSipVersion(java.lang.String s)Set the sipVersion member
sipVersion = s;
|
public void | setUri(URI uri)Set the uri member.
this.uri = uri;
|