FileDocCategorySizeDatePackage
Protocol.javaAPI DocphoneME MR2 API (J2ME)4197Wed May 02 18:00:42 BST 2007gov.nist.siplite.header

Protocol

public class Protocol extends GenericObject
Protocol name and version.
version
1.1 This code is in the public domain.

Fields Summary
protected String
protocolName
protocolName field
protected String
protocolVersion
protocolVersion field
protected String
transport
transport field
Constructors Summary
public Protocol()
Default constructor.

        protocolName = "SIP";
        protocolVersion = "2.0";
        transport = "UDP";
    
Methods Summary
public java.lang.Objectclone()
Clone this structure.

return
Object Protocol

        Protocol retval = new Protocol();
        
        if (this.protocolName != null)
            retval.protocolName = new String(this.protocolName);
        if (this.protocolVersion != null)
            retval.protocolVersion = new String(this.protocolVersion);
        if (this.transport != null)
            retval.transport = new String(this.transport);
        return (Object) retval;
        
    
public java.lang.Stringencode()
Return canonical form.

return
String

        return protocolName.toUpperCase() + Separators.SLASH +
                protocolVersion +
                Separators.SLASH + transport.toUpperCase();
    
public booleanequals(java.lang.Object other)
Compare two protocols for equality.

return
true if the two protocols are the same.
param
other Object to set

        if (! other.getClass().equals(this.getClass())) {
            return false;
        }
        Protocol that = (Protocol) other;
        if (Utils.compareToIgnoreCase(protocolName, that.protocolName)
        != 0) {
            return false;
        }
        if (Utils.compareToIgnoreCase(protocolVersion, protocolVersion)
        != 0) {
            return false;
        }
        if (Utils.compareToIgnoreCase(transport, that.transport) != 0) {
            return false;
        }
        return true;
    
public java.lang.StringgetProtocolName()
get the protocol name

return
String

        return protocolName;
    
public java.lang.StringgetProtocolVersion()
get the protocol version

return
String

        return protocolVersion;
    
public java.lang.StringgetTransport()
get the transport

return
String

        return transport;
    
public voidsetProtocolName(java.lang.String p)
Set the protocolName member

param
p String to set

        protocolName = p;
    
public voidsetProtocolVersion(java.lang.String p)
Set the protocolVersion member

param
p String to set

        protocolVersion = p;
    
public voidsetTransport(java.lang.String t)
Set the transport member

param
t String to set

        transport = t;