sun.security.x509
Interface GeneralNameInterface

All Known Implementing Classes:
DNSName, EDIPartyName, IPAddressName, OIDName, OtherName, RFC822Name, URIName, X500Name

public interface GeneralNameInterface

This interface specifies the abstract methods which have to be implemented by all the members of the GeneralNames ASN.1 object.


Field Summary
static int NAME_ANY
          The list of names supported.
static int NAME_DIFF_TYPE
          The list of constraint results.
static int NAME_DIRECTORY
           
static int NAME_DNS
           
static int NAME_EDI
           
static int NAME_IP
           
static int NAME_MATCH
           
static int NAME_NARROWS
           
static int NAME_OID
           
static int NAME_RFC822
           
static int NAME_SAME_TYPE
           
static int NAME_URI
           
static int NAME_WIDENS
           
static int NAME_X400
           
 
Method Summary
 int constrains(GeneralNameInterface inputName)
          Return type of constraint inputName places on this name: NAME_DIFF_TYPE = -1: input name is different type from name (i.e.
 void encode(DerOutputStream out)
          Encode the name to the specified DerOutputStream.
 int getType()
          Return the type of the general name, as defined above.
 int subtreeDepth()
          Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.
 

Field Detail

NAME_ANY

static final int NAME_ANY
The list of names supported.

See Also:
Constant Field Values

NAME_RFC822

static final int NAME_RFC822
See Also:
Constant Field Values

NAME_DNS

static final int NAME_DNS
See Also:
Constant Field Values

NAME_X400

static final int NAME_X400
See Also:
Constant Field Values

NAME_DIRECTORY

static final int NAME_DIRECTORY
See Also:
Constant Field Values

NAME_EDI

static final int NAME_EDI
See Also:
Constant Field Values

NAME_URI

static final int NAME_URI
See Also:
Constant Field Values

NAME_IP

static final int NAME_IP
See Also:
Constant Field Values

NAME_OID

static final int NAME_OID
See Also:
Constant Field Values

NAME_DIFF_TYPE

static final int NAME_DIFF_TYPE
The list of constraint results.

See Also:
Constant Field Values

NAME_MATCH

static final int NAME_MATCH
See Also:
Constant Field Values

NAME_NARROWS

static final int NAME_NARROWS
See Also:
Constant Field Values

NAME_WIDENS

static final int NAME_WIDENS
See Also:
Constant Field Values

NAME_SAME_TYPE

static final int NAME_SAME_TYPE
See Also:
Constant Field Values
Method Detail

getType

int getType()
Return the type of the general name, as defined above.


encode

void encode(DerOutputStream out)
            throws IOException
Encode the name to the specified DerOutputStream.

Parameters:
out - the DerOutputStream to encode the GeneralName to.
Throws:
IOException - thrown if the GeneralName could not be encoded.

constrains

int constrains(GeneralNameInterface inputName)
               throws UnsupportedOperationException
Return type of constraint inputName places on this name:. These results are used in checking NameConstraints during certification path verification.

Parameters:
inputName - to be checked for being constrained
Throws:
UnsupportedOperationException - if name is same type, but comparison operations are not supported for this name type.

subtreeDepth

int subtreeDepth()
                 throws UnsupportedOperationException
Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.

Throws:
UnsupportedOperationException - if not supported for this name type