Documentation ¶
Index ¶
- Constants
- type Address
- type AddressFactory
- type AddressImpl
- func (this *AddressImpl) GetAddressType() int
- func (this *AddressImpl) GetDisplayName() string
- func (this *AddressImpl) GetHost() (string, error)
- func (this *AddressImpl) GetHostPort() (hp *core.HostPort, RuntimeException error)
- func (this *AddressImpl) GetPort() (int, error)
- func (this *AddressImpl) GetURI() URI
- func (this *AddressImpl) GetUserAtHostPort() string
- func (this *AddressImpl) HasDisplayName() bool
- func (this *AddressImpl) IsSIPAddress() bool
- func (this *AddressImpl) IsWildcard() bool
- func (this *AddressImpl) RemoveDisplayName()
- func (this *AddressImpl) RemoveParameter(parameterName string) error
- func (this *AddressImpl) SetAddess(address URI)
- func (this *AddressImpl) SetAddressType(atype int)
- func (this *AddressImpl) SetDisplayName(displayName string)
- func (this *AddressImpl) SetURI(address URI)
- func (this *AddressImpl) SetUser(user string)
- func (this *AddressImpl) SetWildCardFlag()
- func (this *AddressImpl) String() string
- type Authority
- func (this *Authority) Clone() interface{}
- func (this *Authority) GetHost() *core.Host
- func (this *Authority) GetHostPort() *core.HostPort
- func (this *Authority) GetPassword() string
- func (this *Authority) GetPort() int
- func (this *Authority) GetUser() string
- func (this *Authority) GetUserInfo() *UserInfo
- func (this *Authority) RemovePort()
- func (this *Authority) RemoveUserInfo()
- func (this *Authority) SetHost(host *core.Host)
- func (this *Authority) SetHostPort(h *core.HostPort)
- func (this *Authority) SetPassword(passwd string)
- func (this *Authority) SetPort(port int)
- func (this *Authority) SetUser(user string)
- func (this *Authority) SetUserInfo(u *UserInfo)
- func (this *Authority) String() string
- type Hop
- type SipURI
- type SipURIImpl
- func (this *SipURIImpl) ClearPassword()
- func (this *SipURIImpl) ClearQheaders()
- func (this *SipURIImpl) ClearUriParms()
- func (this *SipURIImpl) Clone() interface{}
- func (this *SipURIImpl) GetAuthority() *Authority
- func (this *SipURIImpl) GetHeader(name string) string
- func (this *SipURIImpl) GetHeaderNames() *core.NameValueList
- func (this *SipURIImpl) GetHost() string
- func (this *SipURIImpl) GetHostPort() *core.HostPort
- func (this *SipURIImpl) GetLrParam() string
- func (this *SipURIImpl) GetMAddrParam() string
- func (this *SipURIImpl) GetMethod() string
- func (this *SipURIImpl) GetMethodParam() string
- func (this *SipURIImpl) GetParameter(name string) string
- func (this *SipURIImpl) GetParameterNames() *list.List
- func (this *SipURIImpl) GetParm(parmname string) interface{}
- func (this *SipURIImpl) GetPort() int
- func (this *SipURIImpl) GetQheaders() *core.NameValueList
- func (this *SipURIImpl) GetScheme() string
- func (this *SipURIImpl) GetTTLParam() int
- func (this *SipURIImpl) GetTelephoneSubscriber() *TelephoneNumber
- func (this *SipURIImpl) GetTransportParam() string
- func (this *SipURIImpl) GetUriParms() *core.NameValueList
- func (this *SipURIImpl) GetUser() string
- func (this *SipURIImpl) GetUserAtHost() string
- func (this *SipURIImpl) GetUserAtHostPort() string
- func (this *SipURIImpl) GetUserParam() string
- func (this *SipURIImpl) GetUserPassword() string
- func (this *SipURIImpl) GetUserType() string
- func (this *SipURIImpl) HasLrParam() bool
- func (this *SipURIImpl) HasParameter(name string) bool
- func (this *SipURIImpl) HasTransport() bool
- func (this *SipURIImpl) IsSecure() bool
- func (this *SipURIImpl) IsSipURI() bool
- func (this *SipURIImpl) IsUserTelephoneSubscriber() bool
- func (this *SipURIImpl) RemoveHeader(name string)
- func (this *SipURIImpl) RemoveHeaders()
- func (this *SipURIImpl) RemoveMAddr()
- func (this *SipURIImpl) RemoveMethod()
- func (this *SipURIImpl) RemoveParameter(name string)
- func (this *SipURIImpl) RemovePort()
- func (this *SipURIImpl) RemoveTTL()
- func (this *SipURIImpl) RemoveTransport()
- func (this *SipURIImpl) RemoveUriParms()
- func (this *SipURIImpl) RemoveUser()
- func (this *SipURIImpl) RemoveUserType()
- func (this *SipURIImpl) SetAuthority(authority *Authority)
- func (this *SipURIImpl) SetDefaultParm(name string, value interface{})
- func (this *SipURIImpl) SetHeader(name, value string)
- func (this *SipURIImpl) SetHost(h *core.Host)
- func (this *SipURIImpl) SetHostPort(hostPort *core.HostPort)
- func (this *SipURIImpl) SetHostString(host string)
- func (this *SipURIImpl) SetIsdnSubAddress(isdnSubAddress string)
- func (this *SipURIImpl) SetLrParam()
- func (this *SipURIImpl) SetMAddr(mAddr string)
- func (this *SipURIImpl) SetMAddrParam(maddr string) error
- func (this *SipURIImpl) SetMethod(method string)
- func (this *SipURIImpl) SetMethodParam(method string)
- func (this *SipURIImpl) SetParameter(name, value string)
- func (this *SipURIImpl) SetPort(p int)
- func (this *SipURIImpl) SetQHeader(nameValue *core.NameValue)
- func (this *SipURIImpl) SetQheaders(parms *core.NameValueList)
- func (this *SipURIImpl) SetScheme(scheme string) error
- func (this *SipURIImpl) SetSecure(secure bool)
- func (this *SipURIImpl) SetTTLParam(ttl int) error
- func (this *SipURIImpl) SetTelephoneSubscriber(tel *TelephoneNumber)
- func (this *SipURIImpl) SetTransportParam(transport string) error
- func (this *SipURIImpl) SetUriParameter(nameValue *core.NameValue)
- func (this *SipURIImpl) SetUriParm(name string, value interface{})
- func (this *SipURIImpl) SetUriParms(parms *core.NameValueList)
- func (this *SipURIImpl) SetUser(uname string)
- func (this *SipURIImpl) SetUserParam(usertype string)
- func (this *SipURIImpl) SetUserPassword(password string)
- func (this *SipURIImpl) String() string
- type TelURL
- type TelURLImpl
- func (this *TelURLImpl) Clone() interface{}
- func (this *TelURLImpl) GetIsdnSubAddress() string
- func (this *TelURLImpl) GetParameter(parameterName string) string
- func (this *TelURLImpl) GetParameterNames() *list.List
- func (this *TelURLImpl) GetPhoneNumber() string
- func (this *TelURLImpl) GetPostDial() string
- func (this *TelURLImpl) GetScheme() string
- func (this *TelURLImpl) IsGlobal() bool
- func (this *TelURLImpl) IsSipURI() bool
- func (this *TelURLImpl) RemoveParameter(name string)
- func (this *TelURLImpl) SetGlobal(global bool)
- func (this *TelURLImpl) SetIsdnSubAddress(isdnSubAddress string)
- func (this *TelURLImpl) SetParameter(name, value string)
- func (this *TelURLImpl) SetPhoneNumber(telephoneNumber string)
- func (this *TelURLImpl) SetPostDial(postDial string)
- func (this *TelURLImpl) SetTelephoneNumber(telephoneNumber *TelephoneNumber)
- func (this *TelURLImpl) String() string
- type TelephoneNumber
- func (this *TelephoneNumber) Clone() interface{}
- func (this *TelephoneNumber) DeleteParm(name string)
- func (this *TelephoneNumber) GetIsdnSubaddress() string
- func (this *TelephoneNumber) GetParameter(name string) string
- func (this *TelephoneNumber) GetParameterNames() *list.List
- func (this *TelephoneNumber) GetPhoneNumber() string
- func (this *TelephoneNumber) GetPostDial() string
- func (this *TelephoneNumber) HasIsdnSubaddress() bool
- func (this *TelephoneNumber) HasParm(pname string) bool
- func (this *TelephoneNumber) HasPostDial() bool
- func (this *TelephoneNumber) IsGlobal() bool
- func (this *TelephoneNumber) RemoveIsdnSubaddress()
- func (this *TelephoneNumber) RemoveParameter(parameter string)
- func (this *TelephoneNumber) RemovePostDial()
- func (this *TelephoneNumber) SetGlobal(g bool)
- func (this *TelephoneNumber) SetIsdnSubaddress(isub string)
- func (this *TelephoneNumber) SetParameter(name, value string)
- func (this *TelephoneNumber) SetParameters(p *core.NameValueList)
- func (this *TelephoneNumber) SetParm(name string, value interface{})
- func (this *TelephoneNumber) SetPhoneNumber(num string)
- func (this *TelephoneNumber) SetPostDial(p string)
- func (this *TelephoneNumber) String() string
- type URI
- type URIImpl
- type UserInfo
- func (this *UserInfo) ClearPassword()
- func (this *UserInfo) Clone() interface{}
- func (this *UserInfo) GetPassword() string
- func (this *UserInfo) GetUser() string
- func (this *UserInfo) GetUserType() int
- func (this *UserInfo) SetPassword(p string)
- func (this *UserInfo) SetUser(user string)
- func (this *UserInfo) SetUserType(t int)
- func (this *UserInfo) String() string
Constants ¶
const ( NAME_ADDR = iota ADDRESS_SPEC WILD_CARD )
*
- Address structure. Imbeds a URI and adds a display name.
const ( TELEPHONE_SUBSCRIBER = iota USER )
* Constant field
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address interface { /** * Sets the display name of the Address. The display name is an * additional user friendly personalized text that accompanies the address. * * @param displayName - the new string value of the display name. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the displayName value. */ SetDisplayName(displayName string) /** * Gets the display name of this Address, or null if the attribute is * not set. * * @return the display name of this Address */ GetDisplayName() string /** * Sets the URI of this Address. The URI can be either a TelURL or a SipURI. * * @param uri - the new URI value of this Address. */ SetURI(uri URI) /** * Returns the URI of this Address. The type of URI can be * determined by the scheme. * * @return URI parmater of the Address object */ GetURI() URI /** * Returns a string representation of this Address. * * @return the stringified representation of the Address */ String() string //ToString() string; /** * This determines if this address is a wildcard address. That is * <code>((SipURI)Address.getURI()).getUser() == *;</code>. This method * is specific to SIP and SIPS schemes. * * @return true if this address is a wildcard, false otherwise. */ IsWildcard() bool }
type AddressFactory ¶
type AddressFactory interface { /** * Creates a URI based on given URI string. The URI string is parsed in * order to create the new URI instance. Depending on the scheme the * returned may or may not be a SipURI or TelURL cast as a URI. * * @param uri - the new string value of the URI. * @throws ParseException if the URI string is malformed. */ CreateURI(uriStr string) (uri URI, ParseException error) /** * Creates a SipURI based on the given user and host components. The user * component may be null. * <p> * This create method first builds a URI in string form using the given * components as follows: * <ul> * <li>Initially, the result string is empty. * <li>The scheme followed by a colon character ('sip:') is appended to * the result. * <li>The user and host are then appended. Any character that is not a * legal URI character is quoted. * </ul> * <br> * The resulting URI string is then parsed in order to create the new * SipURI instance as if by invoking the createURI(String) constructor; * this may cause a URISyntaxException to be thrown. * <p> * An application that wishes to create a 'sips' URI should call the * {@link SipURI#setSecure(boolean)} with an argument of 'true' on the * returned SipURI. * * @param user - the new string value of the user, this value may be null. * @param host - the new string value of the host. * @throws ParseException if the URI string is malformed. */ CreateSipURI(user, host string) (sipuri SipURI, ParseException error) /** * Creates a TelURL based on given URI string. The scheme or '+' should * not be included in the phoneNumber string argument. * * @param uri - the new string value of the phoneNumber. * @throws ParseException if the URI string is malformed. */ CreateTelURL(phoneNumber string) (telurl TelURL, ParseException error) /** * Creates an Address with the new address string value. The address * string is parsed in order to create the new Address instance. Create * with a String value of "*" creates a wildcard address. The wildcard * can be determined if <code>((SipURI)Address.getURI).getUser() == *;</code>. * * @param address - the new string value of the address. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the address value. */ CreateAddressFromString(addrStr string) (addr Address, ParseException error) /** * Creates an Address with the new URI attribute value. * * @param uri - the URI value of the address. */ CreateAddressFromURI(uri URI) (addr Address) /** * Creates an Address with the new display name and URI attribute * values. * * @param displayName - the new string value of the display name of the * address. A <code>null</code> value does not set the display name. * @param uri - the new URI value of the address. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the displayName value. */ CreateAddressFromURIWithDisplayName(displayName string, uri URI) (addr Address, ParseException error) }
*
- This interface provides factory methods that allow an application to create
- Address objects, URI's, SipURI's and TelURL's from a particular
- implementation of this specification. This class is a singleton and can be
- retrieved from the {@link SipFactory#createAddressFactory()}.
type AddressImpl ¶
type AddressImpl struct {
// contains filtered or unexported fields
}
func NewAddressImpl ¶
func NewAddressImpl() *AddressImpl
func (*AddressImpl) GetAddressType ¶
func (this *AddressImpl) GetAddressType() int
*
- Get the address type;
- @return int
func (*AddressImpl) GetDisplayName ¶
func (this *AddressImpl) GetDisplayName() string
*
- get the display name *
- @return String *
func (*AddressImpl) GetHost ¶
func (this *AddressImpl) GetHost() (string, error)
- Get the host name from the address. * *@return the host name.
func (*AddressImpl) GetHostPort ¶
func (this *AddressImpl) GetHostPort() (hp *core.HostPort, RuntimeException error)
- Get the host port portion of the address spec. *@return host:port in a HostPort structure.
func (*AddressImpl) GetPort ¶
func (this *AddressImpl) GetPort() (int, error)
* Get the port from the imbedded URI. This assumes that a SIP URL
- is encapsulated in this address object. * *@return the port from the address. *
func (*AddressImpl) GetURI ¶
func (this *AddressImpl) GetURI() URI
* Returns the URI address of this Address. The type of URI can be
- determined by the scheme. *
- @return address parmater of the Address object
func (*AddressImpl) GetUserAtHostPort ¶
func (this *AddressImpl) GetUserAtHostPort() string
* Get the user@host:port for the address field. This assumes
- that the encapsulated object is a SipURIImpl. *
- BUG Fix from Antonis Kadris. * *@return string containing user@host:port.
func (*AddressImpl) HasDisplayName ¶
func (this *AddressImpl) HasDisplayName() bool
- return true if DisplayName exist. *
- @return boolean
func (*AddressImpl) IsSIPAddress ¶
func (this *AddressImpl) IsSIPAddress() bool
- Return true if the imbedded URI is a sip URI. *
- @return true if the imbedded URI is a SIP URI. *
func (*AddressImpl) IsWildcard ¶
func (this *AddressImpl) IsWildcard() bool
* This determines if this address is a wildcard address. That is
- <code>Address.getAddress.getUserInfo() == *;</code> *
- @return true if this name address is a wildcard, false otherwise.
func (*AddressImpl) RemoveDisplayName ¶
func (this *AddressImpl) RemoveDisplayName()
* remove the displayName field
func (*AddressImpl) RemoveParameter ¶
func (this *AddressImpl) RemoveParameter(parameterName string) error
- Remove a parameter from the address. * *@param parameterName is the name of the parameter to remove.
func (*AddressImpl) SetAddess ¶
func (this *AddressImpl) SetAddess(address URI)
*
- Set the address field *
- @param address SipURIImpl to set *
func (*AddressImpl) SetAddressType ¶
func (this *AddressImpl) SetAddressType(atype int)
*
- Set the address type. The address can be NAME_ADDR, ADDR_SPEC or
- WILD_CARD *
- @param atype int to set *
func (*AddressImpl) SetDisplayName ¶
func (this *AddressImpl) SetDisplayName(displayName string)
*
- Set the displayName member *
- @param displayName String to set *
func (*AddressImpl) SetURI ¶
func (this *AddressImpl) SetURI(address URI)
* Sets the URI address of this Address. The URI can be either a
- TelURL or a SipURI. *
- @param address - the new URI address value of this NameAddress.
func (*AddressImpl) SetUser ¶
func (this *AddressImpl) SetUser(user string)
- Set the user name for the imbedded URI. * *@param user -- user name to set for the imbedded URI.
func (*AddressImpl) SetWildCardFlag ¶
func (this *AddressImpl) SetWildCardFlag()
* Mark this a wild card address type.
func (*AddressImpl) String ¶
func (this *AddressImpl) String() string
*
- Encode the address as a string and return it.
- @return String canonical encoded version of this address.
type Authority ¶
type Authority struct {
// contains filtered or unexported fields
}
* * Authority part of a URI structure. Section 3.2.2 RFC2396
func NewAuthority ¶
func NewAuthority() *Authority
func (*Authority) GetUser ¶
*
- Get the user name if it exists.
- @return String user or null if not set.
func (*Authority) RemoveUserInfo ¶
func (this *Authority) RemoveUserInfo()
* Remove the user Infor. *
type Hop ¶
type Hop interface { /** * Returns the host part of this Hop. * * @return the string value of the host. */ GetHost() string /** * Returns the port part of this Hop. * * @return the integer value of the port. */ GetPort() int /** * Returns the transport part of this Hop. * * @return the string value of the transport. */ GetTransport() string /** * This method returns the Hop as a string. * * @return the stringified version of the Hop */ String() string }
*
- The Hop interface defines a location a request can transit on the way to
- its destination, i.e. a route. It defines the host, port and transport of
- the location. This interface is used to identify locations in the
- {@link Router} interface. *
- @see Router *
type SipURI ¶
type SipURI interface { URI /** * Returns the value of the named parameter, or null if it is not set. A * zero-length String indicates flag parameter. * * @param <var>name</var> name of parameter to retrieve * @return the value of specified parameter */ GetParameter(name string) string /** * Sets the value of the specified parameter. If the parameter already had * a value it will be overwritten. A zero-length String indicates flag * parameter. * * @param name - a String specifying the parameter name * @param value - a String specifying the parameter value * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the parameter name or value. */ SetParameter(name, value string) (ParseException error) /** * Returns an Iterator over the names (Strings) of all parameters present * in this ParametersHeader. * * @return an Iterator over all the parameter names */ GetParameterNames() *list.List //Iterator /** * Removes the specified parameter from Parameters of this ParametersHeader. * This method returns silently if the parameter is not part of the * ParametersHeader. * * @param name - a String specifying the parameter name */ RemoveParameter(name string) /** * Sets the user of SipURI. The identifier of a particular resource at * the host being addressed. The user and the user password including the * '@' sign make up the user-info. * * @param user - the new String value of the user. * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the user value. */ SetUser(user string) (ParseException error) /** * Returns the user part of this SipURI. * * @return the user part of this SipURI */ GetUser() string /** * Sets the user password associated with the user of SipURI. While the SIP and * SIPS URI syntax allows this field to be present, its use is NOT * RECOMMENDED, because the passing of authentication information in clear * text (such as URIs) has proven to be a security risk in almost every * case where it has been used. The user password and the user including * the @ sign make up the user-info. * * @param userPassword - the new String value of the user password * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the userPassword value. */ SetUserPassword(userPassword string) (ParseException error) /** * Gets user password of SipURI, or null if it is not set. * * @return the user password of this SipURI */ GetUserPassword() string /** * Returns true if this SipURI is secure i.e. if this SipURI represents a * sips URI. A sip URI returns false. * * @return <code>true</code> if this SipURI represents a sips URI, and * <code>false</code> if it represents a sip URI. */ IsSecure() bool /** * Sets the scheme of this URI to sip or sips depending on whether the * argument is true or false. The default value is false. * * @param secure - the boolean value indicating if the SipURI is secure. */ SetSecure(secure bool) /** * Set the host part of this SipURI to the newly supplied <code>host</code> * parameter. * * @return host - the new interger value of the host of this SipURI * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the host value. */ SetHost(host string) (ParseException error) /** * Returns the host part of this SipURI. * * @return the host part of this SipURI */ GetHost() string /** * Set the port part of this SipURI to the newly supplied port * parameter. * * @param port - the new interger value of the port of this SipURI */ SetPort(port int) /** * Returns the port part of this SipURI. * * @return the port part of this SipURI */ GetPort() int /** * Removes the port part of this SipURI. If no port is specified the * stack will assume the default port. * */ RemovePort() /** * Returns the value of the named header, or null if it is not set. * SIP/SIPS URIs may specify headers. As an example, the URI * sip:jimmy@jcp.org?priority=urgent has a header "priority" whose * value is "urgent". * * @param <var>name</var> name of header to retrieve * @return the value of specified header */ GetHeader(name string) string /** * 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 * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the name or value parameters. */ SetHeader(name, value string) (ParseException error) /** * Returns an Iterator over the String names of all headers present * in this SipURI. * * @return an Iterator over all the header names */ GetHeaderNames() *list.List //Iterator /** * Returns the value of the "transport" parameter, or null if this is not * set. This is equivalent to getParameter("transport"). * * @return the transport paramter of the SipURI */ GetTransportParam() string /** * Sets the value of the "transport" parameter. This parameter specifies * which transport protocol to use for sending requests and responses to * this entity. The following values are defined: "udp", "tcp", "sctp", * "tls", but other values may be used also. This method is equivalent to * setParameter("transport", transport). Transport parameter constants * are defined in the {@link javax.sip.ListeningPoint}. * * @param transport - new value for the "transport" parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the transport value. */ SetTransportParam(transport string) (ParseException error) /** * Returns the value of the "ttl" parameter, or -1 if this is not set. * This method is equivalent to getParameter("ttl"). * * @return the value of the <code>ttl</code> parameter */ GetTTLParam() int /** * Sets the value of the <code>ttl</code> parameter. The ttl parameter * specifies the time-to-live value when packets are sent using UDP * multicast. This is equivalent to setParameter("ttl", ttl). * * @param ttl - new value of the <code>ttl</code> parameter * @throws InvalidArgumentException if supplied value is less than zero, * excluding -1 the default not set value. */ SetTTLParam(ttl int) (InvalidArgumentException error) /** * Returns the value of the <code>method</code> parameter, or null if this * is not set. This is equivalent to getParameter("method"). * * @return the value of the <code>method</code> parameter */ GetMethodParam() string /** * Sets the value of the <code>method</code> parameter. This specifies * which SIP method to use in requests directed at this URI. This is * equivalent to setParameter("method", method). * * @param method - new value String value of the method parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the method value. */ SetMethodParam(method string) (ParseException error) /** * Sets the value of the user parameter. The user URI parameter exists to * distinguish telephone numbers from user names that happen to look like * telephone numbers. This is equivalent to setParameter("user", user). * * @param userParam - new value String value of the method parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the userParam value. */ SetUserParam(userParam string) (ParseException error) /** * Returns the value of the <code>userParam</code>, or null if this is not * set. * <p> * This is equivalent to getParameter("user"). * * @return the value of the <code>userParam</code> of the SipURI */ GetUserParam() string /** * 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 */ GetMAddrParam() string /** * Sets the value of the <code>maddr</code> parameter of this SipURI. The * maddr parameter indicates the server address to be contacted for this * user, overriding any address derived from the host field. This is * equivalent to setParameter("maddr", maddr). * * @param method - new value of the <code>maddr</code> parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the mAddr value. */ SetMAddrParam(mAddr string) (ParseException error) /** * Returns whether the the <code>lr</code> parameter is set. This is * equivalent to hasParameter("lr"). This interface has no getLrParam as * RFC3261 does not specify any values for the "lr" paramater. * * @return true if the "lr" parameter is set, false otherwise. */ HasLrParam() bool /** * Sets the value of the <code>lr</code> parameter of this SipURI. The lr * parameter, when present, indicates that the element responsible for * this resource implements the routing mechanisms specified in RFC 3261. * This parameter will be used in the URIs proxies place in the * Record-Route header field values, and may appear in the URIs in a * pre-existing route set. */ SetLrParam() }
*
- This class represents SIP URIs, that may have either a <code>sip:</code> or
- <code>sips:</code> scheme. All SIP implementations MUST support the sip:
- URI scheme.
- <p>
- SIP and SIPS URIs are used for addressing. They are similar to email
- addresses in that they are of the form
- <code>user@host</code> where user is either a user name or telephone number,
- and host is a host or domain name, or a numeric IP address. Additionally,
- SIP and SIPS URIs may contain parameters and headers (although headers are
- not legal in all contexts). A SipURI can be embedded in web pages, business
- cards or other hyperlinks to indicate that a particular user or service can
- be called via SIP.
- <p>
- Within a SIP Message, SipURIs are used to indicate the source and intended
- destination of a Request, redirection addresses and the current destination
- of a Request. Normally all these Headers will contain SipURIs.
- <p>
- Syntactically, SIP and SIPS URIs are identical except for the name of the URI
- scheme. The semantics differs in that the SIPS scheme implies that the
- identified resource is to be contacted using TLS. Because SIP and SIPS URIs
- are syntactically identical and because they're used the same way, they're
- both represented by the SipURI interface.
- <p>
- The SipURI interface extends the generic URI interface and provides
- additional convenience methods for the following components of a SipURI
- address, above the generic URI interface:
- <ul>
- <li>User - The set of valid telephone-subscriber strings is a subset of
- valid user strings. The user URI parameter exists to distinguish telephone
- numbers from user names that happen to look like telephone numbers. If the
- user string contains a telephone number formatted as a telephone-subscriber,
- the user parameter value "phone" SHOULD be present. Even without this
- parameter, recipients of SIP and SIPS URIs MAY interpret the pre-@ part as a
- telephone number if local restrictions on the name space for user name allow it.
- <li>UserPassword - A password associated with the user. While the SIP and
- SIPS URI syntax allows this field to be present, its use is NOT RECOMMENDED,
- because the passing of authentication information in clear text (such as
- URIs) has proven to be a security risk in almost every case where it has
- been used. For instance, transporting a PIN number in this field exposes
- the PIN.
- <li>URI parameters - Parameters affecting a request constructed from this
- URI. URI parameters are added after the hostport component and are separated
- by semi-colons. URI parameters take the form:<br>
- parameter-name "=" parameter-value<br>
- Even though an arbitrary number of URI parameters may be included in a URI,
- any given parameter-name MUST NOT appear more than once. The SipURI
- interface also provides convenience methods for the manipulation of popular
- parameters in a SipURI address, namely:
- <ul>
- <li>Lr Parameter - the element responsible for this resource implements the
- routing mechanisms specified in RFC 3261.
- <li>Method - The method of the SIP request constructed from the URI.
- <li>MAddr Parameter - the server address to be contacted for this user.
- <li>TTL Parameter - the time-to-live value when packets are sent using UDP
- multicast.
- <li>User Parameter - the set of valid telephone-subscriber strings.
- <li>Transport Parameter - specifies which transport protocol to use for
- sending requests and responses to this entity
- </ul>
- <li>URI Headers - Header fields to be included in a request constructed from
- the URI. Headers fields in the SIP request can be specified with the "?"
- mechanism within a URI. The header names and values are encoded in
- ampersand separated 'hname = hvalue' pairs. The special hname "body"
- indicates that the associated hvalue is the message-body of the SIP request.
- <li>Secure - This determines if the scheme of this URI is either
- <code>sip:</code> or <code>sips:</code>, where <code>sips:</code> is secure.
- </ul>
- See section 19.1.2 of <a href = "http://www.ietf.org/rfc/rfc3261.txt">RFC3261</a>
- for the use of SIP and SIPS URI components based on the context in which the
- URI appears. *
- @see javax.sip.header.FromHeader
- @see javax.sip.header.ToHeader
- @see javax.sip.header.ContactHeader
- @see URI
type SipURIImpl ¶
type SipURIImpl struct { URIImpl // contains filtered or unexported fields }
* * The SipURIImpl structure.
func NewSipURIImpl ¶
func NewSipURIImpl() *SipURIImpl
func (*SipURIImpl) ClearPassword ¶
func (this *SipURIImpl) ClearPassword()
* *Clear the password from the user part if it exists.
func (*SipURIImpl) ClearUriParms ¶
func (this *SipURIImpl) ClearUriParms()
*
- clear all URI Parameters.
- @since v1.0
func (*SipURIImpl) GetAuthority ¶
func (this *SipURIImpl) GetAuthority() *Authority
* Get the authority.
func (*SipURIImpl) GetHeader ¶
func (this *SipURIImpl) GetHeader(name string) string
* Returns the value of the named header, or null if it is not set.
- SIP/SIPS URIs may specify headers. As an example, the URI
- sip:joe@jcp.org?priority=urgent has a header "priority" whose
- value is "urgent". *
- @param <var>name</var> name of header to retrieve
- @return the value of specified header
func (*SipURIImpl) GetHeaderNames ¶
func (this *SipURIImpl) GetHeaderNames() *core.NameValueList
* Returns an Iterator over the names (Strings) of all headers present
- in this SipURI. *
- @return an Iterator over all the header names
func (*SipURIImpl) GetHost ¶
func (this *SipURIImpl) GetHost() string
* Get the host protion of the URI. * @return the host portion of the url.
func (*SipURIImpl) GetHostPort ¶
func (this *SipURIImpl) GetHostPort() *core.HostPort
*
- Get the host and port of the server.
- @return Get the host:port part of the url parsed into a
- structure.
func (*SipURIImpl) GetLrParam ¶
func (this *SipURIImpl) GetLrParam() string
* Returns the value of the <code>lr</code> parameter, or null if this
- is not Set. This is equivalent to GetParameter("lr"). *
- @return the value of the <code>lr</code> parameter
func (*SipURIImpl) GetMAddrParam ¶
func (this *SipURIImpl) GetMAddrParam() string
* 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
func (*SipURIImpl) GetMethod ¶
func (this *SipURIImpl) GetMethod() string
*
- Get the method parameter.
- @return Method parameter.
func (*SipURIImpl) GetMethodParam ¶
func (this *SipURIImpl) GetMethodParam() string
* Returns the value of the <code>method</code> parameter, or null if this
- is not Set. This is equivalent to GetParameter("method"). *
- @return the value of the <code>method</code> parameter
func (*SipURIImpl) GetParameter ¶
func (this *SipURIImpl) GetParameter(name string) string
*
- Returns the value of the named parameter, or null if it is not Set. A *
- zero-length String indicates flag parameter. * * *
- @param <var>name</var> name of parameter to retrieve *
- @return the value of specified parameter *
func (*SipURIImpl) GetParameterNames ¶
func (this *SipURIImpl) GetParameterNames() *list.List
*
- Returns an Iterator over the names (Strings) of all parameters present *
- in this ParametersHeader. * * *
- @return an Iterator over all the parameter names *
func (*SipURIImpl) GetParm ¶
func (this *SipURIImpl) GetParm(parmname string) interface{}
*
- Get the parameter (do a name lookup) and return null if none exists.
- @param parmname Name of the parameter to Get.
- @return Parameter of the given name (null if none exists).
func (*SipURIImpl) GetPort ¶
func (this *SipURIImpl) GetPort() int
* Get the port from the authority field. * *@return the port from the authority field.
func (*SipURIImpl) GetQheaders ¶
func (this *SipURIImpl) GetQheaders() *core.NameValueList
*
- Accessor forSIPObjects
- @return Get the query headers (that appear after the ? in
- the URL)
func (*SipURIImpl) GetTTLParam ¶
func (this *SipURIImpl) GetTTLParam() int
* Returns the value of the "ttl" parameter, or -1 if this is not Set.
- This method is equivalent to GetParameter("ttl"). *
- @return the value of the <code>ttl</code> parameter
func (*SipURIImpl) GetTelephoneSubscriber ¶
func (this *SipURIImpl) GetTelephoneSubscriber() *TelephoneNumber
*
- Returns the stucture corresponding to the telephone number
- provided that the user is a telephone subscriber.
- @return TelephoneNumber part of the url (only makes sense
- when user = phone is specified)
func (*SipURIImpl) GetTransportParam ¶
func (this *SipURIImpl) GetTransportParam() string
* Returns the value of the "transport" parameter, or null if this is not
- Set. This is equivalent to GetParameter("transport"). *
- @return the transport paramter of the SipURI
func (*SipURIImpl) GetUriParms ¶
func (this *SipURIImpl) GetUriParms() *core.NameValueList
*
- Accessor for URI parameters
- @return A name-value list containing the parameters.
func (*SipURIImpl) GetUser ¶
func (this *SipURIImpl) GetUser() string
- Returns the value of the <code>userParam</code>, *or null if this is not Set.
- <p>
- This is equivalent to GetParameter("user"). *
- @return the value of the <code>userParam</code> of the SipURI
func (*SipURIImpl) GetUserAtHost ¶
func (this *SipURIImpl) GetUserAtHost() string
*
- GetUser@host
- @return user@host portion of the uri (null if none exists).
func (*SipURIImpl) GetUserAtHostPort ¶
func (this *SipURIImpl) GetUserAtHostPort() string
*
- GetUser@host
- @return user@host portion of the uri (null if none exists).
func (*SipURIImpl) GetUserParam ¶
func (this *SipURIImpl) GetUserParam() string
- Returns the user part of this SipURI, or null if it is not Set. *
- @return the user part of this SipURI
func (*SipURIImpl) GetUserPassword ¶
func (this *SipURIImpl) GetUserPassword() string
*
- Get the password of the user.
- @return User password when it embedded as part of the uri
- ( a very bad idea).
func (*SipURIImpl) GetUserType ¶
func (this *SipURIImpl) GetUserType() string
*
- Get the urse parameter.
- @return User parameter (user= phone or user=ip).
func (*SipURIImpl) HasLrParam ¶
func (this *SipURIImpl) HasLrParam() bool
* Returns whether the the <code>lr</code> parameter is Set. This is
- equivalent to hasParameter("lr"). This interface has no GetLrParam as
- RFC3261 does not specify any values for the "lr" paramater. *
- @return true if the "lr" parameter is Set, false otherwise.
func (*SipURIImpl) HasParameter ¶
func (this *SipURIImpl) HasParameter(name string) bool
* Boolean to check if a parameter of a given name exists.
- @param name Name of the parameter to check on.
- @return a boolean indicating whether the parameter exists.
func (*SipURIImpl) HasTransport ¶
func (this *SipURIImpl) HasTransport() bool
* Return true if the transport parameter is defined.
- @return true if transport appears as a parameter and false otherwise.
func (*SipURIImpl) IsSecure ¶
func (this *SipURIImpl) IsSecure() bool
* Returns true if this SipURI is secure i.e. if this SipURI represents a
- sips URI. A sip URI returns false. *
- @return <code>true</code> if this SipURI represents a sips URI, and
- <code>false</code> if it represents a sip URI.
func (*SipURIImpl) IsSipURI ¶
func (this *SipURIImpl) IsSipURI() bool
- This method determines if this is a URI with a scheme of "sip" or "sips". *
- @return true if the scheme is "sip" or "sips", false otherwise.
func (*SipURIImpl) IsUserTelephoneSubscriber ¶
func (this *SipURIImpl) IsUserTelephoneSubscriber() bool
*
- returns true if the user is a telephone subscriber.
- If the host is an Internet telephony
- gateway, a telephone-subscriber field MAY be used instead
- of a user field. The telephone-subscriber field uses the
- notation of RFC 2806 [19]. Any characters of the un-escaped
- "telephone-subscriber" that are not either in the set
- "unreserved" or "user-unreserved" MUST be escaped. The set
- of characters not reserved in the RFC 2806 description of
- telephone-subscriber contains a number of characters in
- various syntax elements that need to be escaped when used
- in SIP URLs, for example quotation marks (%22), hash (%23),
- colon (%3a), at-sign (%40) and the "unwise" characters,
- i.e., punctuation of %5b and above. *
- The telephone number is a special case of a user name and
- cannot be distinguished by a BNF. Thus, a URL parameter,
- user, is added to distinguish telephone numbers from user
- names. *
- The user parameter value "phone" indicates that the user
- part contains a telephone number. Even without this
- parameter, recipients of SIP URLs MAY interpret the pre-@
- part as a telephone number if local restrictions on the
- @return true if the user is a telephone subscriber.
func (*SipURIImpl) RemoveHeader ¶
func (this *SipURIImpl) RemoveHeader(name string)
* Remove a header given its name (provided it exists).
- @param name name of the header to Remove.
func (*SipURIImpl) RemoveMAddr ¶
func (this *SipURIImpl) RemoveMAddr()
*
*Remove the maddr param if it exists.
func (*SipURIImpl) RemoveParameter ¶
func (this *SipURIImpl) RemoveParameter(name string)
*
- Remove a parameter given its name
- @param name -- name of the parameter to Remove.
func (*SipURIImpl) RemoveTTL ¶
func (this *SipURIImpl) RemoveTTL()
*
*Remove the ttl value from the parameter list if it exists.
func (*SipURIImpl) RemoveTransport ¶
func (this *SipURIImpl) RemoveTransport()
*
*Delete the transport string.
func (*SipURIImpl) RemoveUriParms ¶
func (this *SipURIImpl) RemoveUriParms()
* Remove the URI parameters. *
func (*SipURIImpl) SetAuthority ¶
func (this *SipURIImpl) SetAuthority(authority *Authority)
* Set the authority member
- @param authority Authority to set.
func (*SipURIImpl) SetDefaultParm ¶
func (this *SipURIImpl) SetDefaultParm(name string, value interface{})
* 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.
func (*SipURIImpl) SetHeader ¶
func (this *SipURIImpl) SetHeader(name, value string)
* 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
func (*SipURIImpl) SetHost ¶
func (this *SipURIImpl) SetHost(h *core.Host)
* Set the host for this URI.
- @param h host to set.
func (*SipURIImpl) SetHostPort ¶
func (this *SipURIImpl) SetHostPort(hostPort *core.HostPort)
- Set the hostPort field of the imbedded authority field. *@param hostPort is the hostPort to set.
func (*SipURIImpl) SetHostString ¶
func (this *SipURIImpl) SetHostString(host string)
- Returns the host part of this SipURI. *
- @return the host part of this SipURI
func (*SipURIImpl) SetIsdnSubAddress ¶
func (this *SipURIImpl) SetIsdnSubAddress(isdnSubAddress string)
*
- Sets ISDN subaddress of SipURL
- @param <var>isdnSubAddress</var> ISDN subaddress
func (*SipURIImpl) SetLrParam ¶
func (this *SipURIImpl) SetLrParam()
* Sets the value of the <code>lr</code> parameter of this SipURI. The lr
- parameter, when present, indicates that the element responsible for
- this resource implements the routing mechanisms specified in RFC 3261.
- This parameter will be used in the URIs proxies place in the
- Record-Route header field values, and may appear in the URIs in a
- pre-existing route Set.
func (*SipURIImpl) SetMAddr ¶
func (this *SipURIImpl) SetMAddr(mAddr string)
*
- Set the MADDR parameter .
- @param mAddr Host Name to set
func (*SipURIImpl) SetMAddrParam ¶
func (this *SipURIImpl) SetMAddrParam(maddr string) error
* Sets the value of the <code>maddr</code> parameter of this SipURI. The
- maddr parameter indicates the server address to be contacted for this
- user, overriding any address derived from the host field. This is
- equivalent to SetParameter("maddr", maddr). *
- @param method - new value of the <code>maddr</code> parameter
func (*SipURIImpl) SetMethod ¶
func (this *SipURIImpl) SetMethod(method string)
* set the Method
- @param method method parameter
func (*SipURIImpl) SetMethodParam ¶
func (this *SipURIImpl) SetMethodParam(method string)
* Sets the value of the <code>method</code> parameter. This specifies
- which SIP method to use in requests directed at this URI. This is
- equivalent to SetParameter("method", method). *
- @param method - new value String value of the method parameter
func (*SipURIImpl) SetParameter ¶
func (this *SipURIImpl) SetParameter(name, value string)
*
- Sets the value of the specified parameter. If the parameter already had *
- a value it will be overwritten. A zero-length String indicates flag *
- parameter. * * *
- @param name - a String specifying the parameter name *
- @param value - a String specifying the parameter value *
- @throws ParseException which signals that an error has been reached *
- unexpectedly while parsing the parameter name or value. *
func (*SipURIImpl) SetPort ¶
func (this *SipURIImpl) SetPort(p int)
* set the port to a given value.
- @param p Port to set.
func (*SipURIImpl) SetQHeader ¶
func (this *SipURIImpl) SetQHeader(nameValue *core.NameValue)
- Set the query header when provided as a name-value pair. *@param qHeader - qeuery header provided as a name,value pair.
func (*SipURIImpl) SetQheaders ¶
func (this *SipURIImpl) SetQheaders(parms *core.NameValueList)
* Set the qheaders member
- @param parms query headers to set.
func (*SipURIImpl) SetScheme ¶
func (this *SipURIImpl) SetScheme(scheme string) error
* Constructor given the scheme.
- The scheme must be either Sip or Sips
func (*SipURIImpl) SetSecure ¶
func (this *SipURIImpl) SetSecure(secure bool)
* Sets the scheme of this URI to sip or sips depending on whether the
- argument is true or false. The default value is false. *
- @param secure - the boolean value indicating if the SipURI is secure.
func (*SipURIImpl) SetTTLParam ¶
func (this *SipURIImpl) SetTTLParam(ttl int) error
* Sets the value of the <code>ttl</code> parameter. The ttl parameter
- specifies the time-to-live value when packets are sent using UDP
- multicast. This is equivalent to SetParameter("ttl", ttl). *
- @param ttl - new value of the <code>ttl</code> parameter
func (*SipURIImpl) SetTelephoneSubscriber ¶
func (this *SipURIImpl) SetTelephoneSubscriber(tel *TelephoneNumber)
* Set the telephone subscriber field.
- @param tel Telephone subscriber field to set.
func (*SipURIImpl) SetTransportParam ¶
func (this *SipURIImpl) SetTransportParam(transport string) error
* Sets the value of the "transport" parameter. This parameter specifies
- which transport protocol to use for sending requests and responses to
- this entity. The following values are defined: "udp", "tcp", "sctp",
- "tls", but other values may be used also. This method is equivalent to
- SetParameter("transport", transport). Transport parameter constants
- are defined in the {@link javax.sip.ListeningPoint}. *
- @param transport - new value for the "transport" parameter
- @see javax.sip.ListeningPoint
func (*SipURIImpl) SetUriParameter ¶
func (this *SipURIImpl) SetUriParameter(nameValue *core.NameValue)
- Set the parameter as given. *@param nameValue - parameter to set.
func (*SipURIImpl) SetUriParm ¶
func (this *SipURIImpl) SetUriParm(name string, value interface{})
*
- 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.
func (*SipURIImpl) SetUriParms ¶
func (this *SipURIImpl) SetUriParms(parms *core.NameValueList)
* Set the uriParms member
- @param parms URI parameters to set.
func (*SipURIImpl) SetUser ¶
func (this *SipURIImpl) SetUser(uname string)
* Sets the user of SipURI. The identifier of a particular resource at
- the host being addressed. The user and the user password including the
- "at" sign make up the user-info. *
- @param user - the new String value of the user.
- @throws ParseException which signals that an error has been reached
- unexpectedly while parsing the user value.
func (*SipURIImpl) SetUserParam ¶
func (this *SipURIImpl) SetUserParam(usertype string)
* Sets the value of the user parameter. The user URI parameter exists to
- distinguish telephone numbers from user names that happen to look like
- telephone numbers. This is equivalent to setParameter("user", user). *
- @param userParam - new value String value of the method parameter
func (*SipURIImpl) SetUserPassword ¶
func (this *SipURIImpl) SetUserPassword(password string)
- Set the user password. *@param password - password to set.
func (*SipURIImpl) String ¶
func (this *SipURIImpl) String() string
*
- Construct a URL from the parsed structure.
- @return String
type TelURL ¶
type TelURL interface { URI /** * Returns the value of the named parameter, or null if it is not set. A * zero-length String indicates flag parameter. * * @param <var>name</var> name of parameter to retrieve * @return the value of specified parameter */ GetParameter(name string) string /** * Sets the value of the specified parameter. If the parameter already had * a value it will be overwritten. A zero-length String indicates flag * parameter. * * @param name - a String specifying the parameter name * @param value - a String specifying the parameter value * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the parameter name or value. */ SetParameter(name, value string) /** * Returns an Iterator over the names (Strings) of all parameters present * in this ParametersHeader. * * @return an Iterator over all the parameter names */ GetParameterNames() *list.List //Iterator /** * Removes the specified parameter from Parameters of this ParametersHeader. * This method returns silently if the parameter is not part of the * ParametersHeader. * * @param name - a String specifying the parameter name */ RemoveParameter(name string) /** * Returns <code>true</code> if this TelURL is global i.e. if the TelURI * has a global phone user. * * @return <code>true</code> if this TelURL represents a global phone user, * and <code>false</code> otherwise. */ IsGlobal() bool /** * Sets phone user of this TelURL to be either global or local. The default * value is false, hence the TelURL is defaulted to local. * * @param global - the boolean value indicating if the TelURL has a global * phone user. */ SetGlobal(global bool) /** * Sets post dial of this TelURL. The post-dial sequence describes what and * when the local entity should send to the phone line. * * @param postDial - new value of the <code>postDial</code> parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the postDial value. */ SetPostDial(postDial string) (ParseException error) /** * Returns the value of the <code>postDial</code> parameter, or null if it * is not set. * * @return the value of the <code>postDial</code> parameter */ GetPostDial() string /** * Sets phone number of this TelURL. The phone number may either be local or * global determined by the isGlobal method in this interface. The phoneNumber * argument should not contain the "+" associated with telephone numbers. * * @param phoneNumber - new value of the <code>phoneNumber</code> parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the phoneNumber value. */ SetPhoneNumber(phoneNumber string) (ParseException error) /** * Returns the value of the <code>phoneNumber</code> parameter. This method * will not return the "+" associated with telephone numbers. * * @return the value of the <code>phoneNumber</code> parameter */ GetPhoneNumber() string /** * Sets ISDN subaddress of this TelURL. If a subaddress is present, it is * appended to the phone number after ";isub=". * * @param isdnSubAddress - new value of the <code>isdnSubAddress</code> * parameter * @throws ParseException which signals that an error has been reached * unexpectedly while parsing the isdnSubAddress value. */ SetIsdnSubAddress(isdnSubAddress string) (ParseException error) /** * Returns the value of the <code>isdnSubAddress</code> parameter, or null * if it is not set. * * @return the value of the <code>isdnSubAddress</code> parameter */ GetIsdnSubAddress() string }
type TelURLImpl ¶
type TelURLImpl struct { URIImpl // contains filtered or unexported fields }
* Implementation of the TelURL interface. *<a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a> *
func (*TelURLImpl) Clone ¶
func (this *TelURLImpl) Clone() interface{}
- Deep copy clone operation. * *@return -- a cloned version of this telephone number.
func (*TelURLImpl) GetIsdnSubAddress ¶
func (this *TelURLImpl) GetIsdnSubAddress() string
* Returns the value of the <code>isdnSubAddress</code> parameter, or null
- if it is not Set. *
- @return the value of the <code>isdnSubAddress</code> parameter
func (*TelURLImpl) GetParameter ¶
func (this *TelURLImpl) GetParameter(parameterName string) string
func (*TelURLImpl) GetParameterNames ¶
func (this *TelURLImpl) GetParameterNames() *list.List
func (*TelURLImpl) GetPhoneNumber ¶
func (this *TelURLImpl) GetPhoneNumber() string
- Get the telephone number. * *@return -- the telephone number.
func (*TelURLImpl) GetPostDial ¶
func (this *TelURLImpl) GetPostDial() string
* Returns the value of the <code>postDial</code> parameter, or null if it
- is not Set. *
- @return the value of the <code>postDial</code> parameter
func (*TelURLImpl) GetScheme ¶
func (this *TelURLImpl) GetScheme() string
* Returns the value of the "scheme" of this URI, for example "sip", "sips"
- or "tel". *
- @return the scheme paramter of the URI
func (*TelURLImpl) IsGlobal ¶
func (this *TelURLImpl) IsGlobal() bool
* Returns <code>true</code> if this TelURL is global i.e. if the TelURI
- has a global phone user. *
- @return <code>true</code> if this TelURL represents a global phone user,
- and <code>false</code> otherwise.
func (*TelURLImpl) IsSipURI ¶
func (this *TelURLImpl) IsSipURI() bool
- This method determines if this is a URI with a scheme of "sip" or "sips". *
- @return true if the scheme is "sip" or "sips", false otherwise.
func (*TelURLImpl) RemoveParameter ¶
func (this *TelURLImpl) RemoveParameter(name string)
func (*TelURLImpl) SetGlobal ¶
func (this *TelURLImpl) SetGlobal(global bool)
* Sets phone user of this TelURL to be either global or local. The default
- value is false, hence the TelURL is defaulted to local. *
- @param global - the boolean value indicating if the TelURL has a global
- phone user.
func (*TelURLImpl) SetIsdnSubAddress ¶
func (this *TelURLImpl) SetIsdnSubAddress(isdnSubAddress string)
* Sets ISDN subaddress of this TelURL. If a subaddress is present, it is
- appended to the phone number after ";isub=". *
- @param isdnSubAddress - new value of the <code>isdnSubAddress</code>
- parameter
func (*TelURLImpl) SetParameter ¶
func (this *TelURLImpl) SetParameter(name, value string)
func (*TelURLImpl) SetPhoneNumber ¶
func (this *TelURLImpl) SetPhoneNumber(telephoneNumber string)
* Set the telephone number.
- @param telphoneNumber -- long phone number to Set.
func (*TelURLImpl) SetPostDial ¶
func (this *TelURLImpl) SetPostDial(postDial string)
* Sets post dial of this TelURL. The post-dial sequence describes what and
- when the local entity should send to the phone line. *
- @param postDial - new value of the <code>postDial</code> parameter
func (*TelURLImpl) SetTelephoneNumber ¶
func (this *TelURLImpl) SetTelephoneNumber(telephoneNumber *TelephoneNumber)
func (*TelURLImpl) String ¶
func (this *TelURLImpl) String() string
type TelephoneNumber ¶
type TelephoneNumber struct {
// contains filtered or unexported fields
}
* Telephone number class.
func (*TelephoneNumber) Clone ¶
func (this *TelephoneNumber) Clone() interface{}
func (*TelephoneNumber) DeleteParm ¶
func (this *TelephoneNumber) DeleteParm(name string)
* delete the specified parameter.
- @param name String to set
func (*TelephoneNumber) GetIsdnSubaddress ¶
func (this *TelephoneNumber) GetIsdnSubaddress() string
*
- Get the isdn subaddress for this number.
- @return String
func (*TelephoneNumber) GetParameter ¶
func (this *TelephoneNumber) GetParameter(name string) string
*
- Returns the value of the named parameter, or null if it is not set. A
- zero-length String indicates flag parameter. *
- @param <var>name</var> name of parameter to retrieve *
- @return the value of specified parameter *
func (*TelephoneNumber) GetParameterNames ¶
func (this *TelephoneNumber) GetParameterNames() *list.List
*
* * Returns an Iterator over the names (Strings) of all parameters. * * @return an Iterator over all the parameter names *
func (*TelephoneNumber) GetPhoneNumber ¶
func (this *TelephoneNumber) GetPhoneNumber() string
* get the PhoneNumber field
- @return String
func (*TelephoneNumber) GetPostDial ¶
func (this *TelephoneNumber) GetPostDial() string
* get the PostDial field
- @return String
func (*TelephoneNumber) HasIsdnSubaddress ¶
func (this *TelephoneNumber) HasIsdnSubaddress() bool
*
- return true if the isdn subaddress exists.
- @return boolean
func (*TelephoneNumber) HasParm ¶
func (this *TelephoneNumber) HasParm(pname string) bool
* return true if this header has parameters.
- @param pname String to set
- @return boolean
func (*TelephoneNumber) HasPostDial ¶
func (this *TelephoneNumber) HasPostDial() bool
* returns true if th PostDial field exists
- @return boolean
func (*TelephoneNumber) IsGlobal ¶
func (this *TelephoneNumber) IsGlobal() bool
*
- is a global telephone number.
- @return boolean
func (*TelephoneNumber) RemoveIsdnSubaddress ¶
func (this *TelephoneNumber) RemoveIsdnSubaddress()
*
- Remove the isdn subaddress (if it exists).
func (*TelephoneNumber) RemoveParameter ¶
func (this *TelephoneNumber) RemoveParameter(parameter string)
func (*TelephoneNumber) RemovePostDial ¶
func (this *TelephoneNumber) RemovePostDial()
* remove the PostDial field
func (*TelephoneNumber) SetGlobal ¶
func (this *TelephoneNumber) SetGlobal(g bool)
* set the Global field
- @param g boolean to set
func (*TelephoneNumber) SetIsdnSubaddress ¶
func (this *TelephoneNumber) SetIsdnSubaddress(isub string)
*
- set the isdn subaddress for this structure.
- @param isub String to set
func (*TelephoneNumber) SetParameter ¶
func (this *TelephoneNumber) SetParameter(name, value string)
func (*TelephoneNumber) SetParameters ¶
func (this *TelephoneNumber) SetParameters(p *core.NameValueList)
*
- Set the list of parameters.
- @param p NameValueList to set
func (*TelephoneNumber) SetParm ¶
func (this *TelephoneNumber) SetParm(name string, value interface{})
* set the specified parameter
- @param name String to set
- @param value Object to set
func (*TelephoneNumber) SetPhoneNumber ¶
func (this *TelephoneNumber) SetPhoneNumber(num string)
* set the PhoneNumber field
- @param num String to set
func (*TelephoneNumber) SetPostDial ¶
func (this *TelephoneNumber) SetPostDial(p string)
* set the PostDial field
- @param p String to set
func (*TelephoneNumber) String ¶
func (this *TelephoneNumber) String() string
type URI ¶
type URI interface { /** * Returns the value of the "scheme" of this URI, for example "sip", "sips" * or "tel". * * @return the scheme paramter of the URI */ GetScheme() string /** * Creates and returns a deep copy of the URI. This methods must ensure a * deep copy of the URI, so that when a URI is cloned the URI can be * modified without effecting the original URI. This provides useful * functionality for proxying Requests and Responses. This method overrides * the clone method in java.lang.Object. * * @return a deep copy of URI */ Clone() interface{} /** * This method determines if this is a URI with a scheme of "sip" or "sips". * * @return true if the scheme is "sip" or "sips", false otherwise. */ IsSipURI() bool /** * This method returns the URI as a string. * * @return String The stringified version of the URI */ String() string }
type URIImpl ¶
type URIImpl struct {
// contains filtered or unexported fields
}
* Implementation of the URI class. This relies on the 1.4 URI class.
func NewURIImpl ¶
* Constructor given the URI string
- @param uriString The imbedded URI string.
- @throws URISyntaxException When there is a syntaz error in the imbedded URI.
func (*URIImpl) Clone ¶
func (this *URIImpl) Clone() interface{}
* Overrides the base clone method
- @return The Cloned strucutre,
func (*URIImpl) GetScheme ¶
* Returns the value of the "scheme" of
- this URI, for example "sip", "sips" or "tel". *
- @return the scheme paramter of the URI
type UserInfo ¶
type UserInfo struct {
// contains filtered or unexported fields
}
* * User information part of a URL.
func (*UserInfo) GetUserType ¶
*
- Gets the user type (which can be set to TELEPHONE_SUBSCRIBER or USER)
- @return the type of user.
func (*UserInfo) SetUserType ¶
*
- Set the user type (to TELEPHONE_SUBSCRIBER or USER).
- @param type int to set
- @throws IllegalArgumentException if type is not in range.