|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.server.kerberos.shared.messages.value.PrincipalName
public class PrincipalName
A principal Name, composed of a type and N names. PrincipalName ::= SEQUENCE { name-type [0] Int32, name-string [1] SEQUENCE OF KerberosString }
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
parent |
| Constructor Summary | |
|---|---|
PrincipalName()
Creates a new empty instance of PrincipalName. |
|
PrincipalName(javax.security.auth.kerberos.KerberosPrincipal principal)
Creates a new instance of PrincipalName, given a KerberosPrincipal. |
|
PrincipalName(java.lang.String nameString,
int nameType)
Creates a new instance of PrincipalName. |
|
PrincipalName(java.lang.String nameString,
PrincipalNameType nameType)
Creates a new instance of PrincipalName given a String and an prinipal type. |
|
| Method Summary | |
|---|---|
void |
addName(java.lang.String name)
Add a new name to the PrincipalName |
int |
computeLength()
Compute the PrincipalName length PrincipalName : 0x30 L1 PrincipalName sequence | +--> 0xA1 L2 name-type tag | | | +--> 0x02 L2-1 addressType (int) | +--> 0xA2 L3 name-string tag | +--> 0x30 L3-1 name-string (SEQUENCE OF KerberosString) | +--> 0x1B L4[1] value (KerberosString) | +--> 0x1B L4[2] value (KerberosString) | ... |
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the PrincipalName message to a PDU. |
java.util.List<java.lang.String> |
getNames()
Returns the name components. |
java.lang.String |
getNameString()
|
PrincipalNameType |
getNameType()
Returns the type of the PrincipalName. |
void |
setNameType(int nameType)
Set the Principal name Type |
void |
setNameType(PrincipalNameType nameType)
Set the Principal name Type |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PrincipalName()
public PrincipalName(javax.security.auth.kerberos.KerberosPrincipal principal)
principal - A Sun kerberosPrincipal instance
public PrincipalName(java.lang.String nameString,
PrincipalNameType nameType)
throws java.text.ParseException
nameString - The name string, which can contains more than one nameComponentnameType - The principal name
java.text.ParseException
public PrincipalName(java.lang.String nameString,
int nameType)
throws java.text.ParseException
nameString - nameType -
java.text.ParseException| Method Detail |
|---|
public PrincipalNameType getNameType()
PrincipalName.
PrincipalName.public void setNameType(PrincipalNameType nameType)
nameType - the Principal name Typepublic void setNameType(int nameType)
nameType - the Principal name Typepublic java.util.List<java.lang.String> getNames()
public java.lang.String getNameString()
public void addName(java.lang.String name)
name - The name to addpublic int computeLength()
computeLength in interface org.apache.directory.shared.asn1.Asn1ObjectcomputeLength in class org.apache.directory.shared.asn1.AbstractAsn1Object
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws org.apache.directory.shared.asn1.codec.EncoderException
encode in interface org.apache.directory.shared.asn1.Asn1Objectencode in class org.apache.directory.shared.asn1.AbstractAsn1Objectbuffer - The buffer where to put the PDU. It should have been allocated
before, with the right size.
org.apache.directory.shared.asn1.codec.EncoderExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||