Package org.globus.gsi.gssapi
Class GlobusGSSName
- java.lang.Object
-
- org.globus.gsi.gssapi.GlobusGSSName
-
- All Implemented Interfaces:
java.io.Serializable,org.ietf.jgss.GSSName
public class GlobusGSSName extends java.lang.Object implements org.ietf.jgss.GSSName, java.io.SerializableAn implementation ofGSSName.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classGlobusGSSName.ReverseDNSCache
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringglobusIDprotected java.lang.StringhostBasedServiceCNprotected javax.security.auth.x500.X500Principalnameprotected org.ietf.jgss.OidnameType(package private) static GlobusGSSName.ReverseDNSCachereverseDNSCache
-
Constructor Summary
Constructors Constructor Description GlobusGSSName()GlobusGSSName(byte[] name)GlobusGSSName(java.lang.String name)Creates name from Globus DNGlobusGSSName(java.lang.String name, org.ietf.jgss.Oid nameType)Creates name from X509 name of specified type.GlobusGSSName(javax.security.auth.x500.X500Principal name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.ietf.jgss.GSSNamecanonicalize(org.ietf.jgss.Oid mech)Currently not implemented.private static booleancompareHost(java.lang.String host1, int i, java.lang.String host2, int j)booleanequals(org.ietf.jgss.GSSName another)byte[]export()Currently not implemented.private static java.lang.StringgetHost(java.lang.String name)protected java.lang.StringgetHostBasedServiceCN(boolean last)Returns the CN corresponding to the host part of the DNprivate static java.lang.StringgetService(java.lang.String name)org.ietf.jgss.OidgetStringNameType()Currently not implemented.booleanisAnonymous()booleanisMN()(package private) static java.lang.StringqueryHost(java.lang.String name)private voidreadObject(java.io.ObjectInputStream ois)java.lang.StringtoString()Returns globus ID string representation of the name.private voidwriteObject(java.io.ObjectOutputStream oos)
-
-
-
Field Detail
-
reverseDNSCache
static final GlobusGSSName.ReverseDNSCache reverseDNSCache
-
nameType
protected org.ietf.jgss.Oid nameType
-
name
protected javax.security.auth.x500.X500Principal name
-
globusID
protected java.lang.String globusID
-
hostBasedServiceCN
protected java.lang.String hostBasedServiceCN
-
-
Constructor Detail
-
GlobusGSSName
public GlobusGSSName()
-
GlobusGSSName
public GlobusGSSName(javax.security.auth.x500.X500Principal name)
-
GlobusGSSName
public GlobusGSSName(byte[] name)
-
GlobusGSSName
public GlobusGSSName(java.lang.String name) throws org.ietf.jgss.GSSExceptionCreates name from Globus DN- Parameters:
name- Globus DN (e.g. /C=US/O=Globus/..) If null it is considered set asGSSName.ANONYMOUSname type.- Throws:
org.ietf.jgss.GSSException
-
GlobusGSSName
public GlobusGSSName(java.lang.String name, org.ietf.jgss.Oid nameType) throws org.ietf.jgss.GSSExceptionCreates name from X509 name of specified type.- Parameters:
name- Globus DN (e.g. /C=US/O=Globus/..) or service@host name. If null it is considered set asGSSName.ANONYMOUSname type.nameType- name type. OnlyGSSName.NT_ANONYMOUSorGSSName.NT_HOSTBASED_SERVICEis supported. Maybe be null.- Throws:
org.ietf.jgss.GSSException
-
-
Method Detail
-
queryHost
static java.lang.String queryHost(java.lang.String name) throws java.net.UnknownHostException- Throws:
java.net.UnknownHostException
-
isAnonymous
public boolean isAnonymous()
- Specified by:
isAnonymousin interfaceorg.ietf.jgss.GSSName
-
isMN
public boolean isMN()
- Specified by:
isMNin interfaceorg.ietf.jgss.GSSName
-
equals
public boolean equals(org.ietf.jgss.GSSName another) throws org.ietf.jgss.GSSException- Specified by:
equalsin interfaceorg.ietf.jgss.GSSName- Throws:
org.ietf.jgss.GSSException
-
toString
public java.lang.String toString()
Returns globus ID string representation of the name. If name represents is an anonymous name string "<anonymous>" is returned.- Specified by:
toStringin interfaceorg.ietf.jgss.GSSName- Overrides:
toStringin classjava.lang.Object
-
getHostBasedServiceCN
protected java.lang.String getHostBasedServiceCN(boolean last)
Returns the CN corresponding to the host part of the DN- Parameters:
last- true if the CN is assumed to be the last CN attribute in the RFC 2253 formatted DN, else false to assume it is the first DN attribute- Returns:
- the CN of the host based service
-
getService
private static java.lang.String getService(java.lang.String name)
-
getHost
private static java.lang.String getHost(java.lang.String name)
-
compareHost
private static boolean compareHost(java.lang.String host1, int i, java.lang.String host2, int j)
-
getStringNameType
public org.ietf.jgss.Oid getStringNameType() throws org.ietf.jgss.GSSExceptionCurrently not implemented.- Specified by:
getStringNameTypein interfaceorg.ietf.jgss.GSSName- Throws:
org.ietf.jgss.GSSException
-
export
public byte[] export() throws org.ietf.jgss.GSSExceptionCurrently not implemented.- Specified by:
exportin interfaceorg.ietf.jgss.GSSName- Throws:
org.ietf.jgss.GSSException
-
canonicalize
public org.ietf.jgss.GSSName canonicalize(org.ietf.jgss.Oid mech) throws org.ietf.jgss.GSSExceptionCurrently not implemented.- Specified by:
canonicalizein interfaceorg.ietf.jgss.GSSName- Throws:
org.ietf.jgss.GSSException
-
writeObject
private void writeObject(java.io.ObjectOutputStream oos) throws java.io.IOException- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream ois) throws java.io.IOException, java.lang.ClassNotFoundException- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-