Find JSRs
Submit this Search


Ad Banner
 
 
 
 

SipsProtocolPermission (API Reference)

javax.microedition.sip
Class SipsProtocolPermission

java.lang.Object
  extended by GCFPermission
      extended by javax.microedition.sip.SipsProtocolPermission

public final class SipsProtocolPermission
extends GCFPermission

This class represents access rights to connections via the sip protocol. SipsProtocolPermission consists of a URI string but no actions list. The URI string specifies a connection target and used protocol e.g. sip:user@172.21.38.219:5070.

The URI is specified in RFC3261 [1] and here it takes general form of:

{scheme}:[{target}][{params}]

where:

  • scheme is SIP scheme supported by the system sip or sips
  • target is user network address in form of [{user_name}@]{target_host}[:{port}] or {telephone_number}
  • params stands for additional SIP URI parameters like ;transport=udp

The SIP URI may contain quote characters. The application can use either the quote character or it's escaped version (%22), the API implementation must support both forms.

See Also:
in MIDP 3.0 Specification

Constructor Summary
SipsProtocolPermission(java.lang.String uri)
          Creates a new SipsProtocolPermission instance with the specified URI as its name.
 
Method Summary
 boolean equals(java.lang.Object object)
          Checks two Permission objects for equality
 java.lang.String getActions()
          Returns the actions as a String.
 java.lang.String getProtocol()
          Returns the protocol scheme of this SipsProtocolPermission
 java.lang.String getURI()
          Returns the URI of this SipsProtocolPermission
 int hashCode()
          Returns the hash code value for this Permission object
 boolean implies(java.security.Permission p)
          Checks if this SipsProtocolPermission object implies the specified permission.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SipsProtocolPermission

public SipsProtocolPermission(java.lang.String uri)

Creates a new SipsProtocolPermission instance with the specified URI as its name.

Parameters:
uri - the URI string.
Throws:
java.lang.IllegalArgumentException - if the uri is malformed
java.lang.NullPointerException - if uri is null
See Also:
Permission.getName()
Method Detail

getProtocol

public java.lang.String getProtocol()

Returns the protocol scheme of this SipsProtocolPermission

See Also:
java.security.GCFPermission

getURI

public java.lang.String getURI()

Returns the URI of this SipsProtocolPermission

See Also:
java.security.GCFPermission

implies

public boolean implies(java.security.Permission p)

Checks if this SipsProtocolPermission object implies the specified permission.

Method returns true if:

  • p is an instance of SipsProtocolPermission and
  • p's URI equals this object's URI (Refer to the RFC3261 [1] section 25 how the URIs are constructed.)

are true and if one or more of following condition is met:

  • If this object has a IP address and p's IP address is equal to this object's IP address.
  • If this object has a wildcard domain (such as *.amazon.com), and p's absolute name (the name with any preceding * removed) ends with this object's absolute name. For example, *.amazon.com implies *.uk.amazon.com.
  • If this object's name equals p's name.

Parameters:
p - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(java.lang.Object object)

Checks two Permission objects for equality

Returns:
true if obj is a HttpsProtocolPermission and has the same URI string as this SipsProtocolPermission object.
See Also:
Permission

getActions

public java.lang.String getActions()

Returns the actions as a String. Since the SipsProtocolPermission does not have actions, method will always return empty string.

Returns:
the empty string
See Also:
Permission

hashCode

public int hashCode()

Returns the hash code value for this Permission object

Returns:
a hash code value for this object
See Also:
Permission


Copyright © 2007 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.