Package com.sun.grid.ca

# Class GridCAX500Name

java.lang.Object
com.sun.grid.ca.GridCAX500Name

public class GridCAX500Name extends Object
Helper class for parsing X500 names. Daemon certificates have the form

       ....,UID=sdm_daemon_<username>,CN=<daemon name>,...

User certificates have the form

       ....,UID=<username>,...

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`SDM_DAEMON_PREFIX`
`static final String`
`TYPE_SDM_DAEMON`
`static final String`
`TYPE_SGE_DAEMON`
`static final String`
`TYPE_USER`

## Method Summary

Modifier and Type
Method
Description
`String`
`getDaemonName()`
Get the name of the daemon
`String`
`getUsername()`
Get the username from the x500 name
`boolean`
`isDaemon()`
Determine of the x500 name describes a daemon
`static GridCAX500Name`
`parse(String name)`
Parse a x500 name

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### TYPE_SGE_DAEMON

public static final String TYPE_SGE_DAEMON

See Also:
  - Constant Field Values

### TYPE_SDM_DAEMON

public static final String TYPE_SDM_DAEMON

See Also:
  - Constant Field Values

### TYPE_USER

public static final String TYPE_USER

See Also:
  - Constant Field Values

### SDM_DAEMON_PREFIX

public static final String SDM_DAEMON_PREFIX

See Also:
  - Constant Field Values

## Method Details

### parse

public static GridCAX500Name parse(String name) throws GridCAException
Parse a x500 name

Parameters:
  `name` - the x500 name
Returns:
  the grid ca x500 name
Throws:
  `GridCAException` - if `name` is not a valid grid ca x500 name

### isDaemon

public boolean isDaemon()
Determine of the x500 name describes a daemon

Returns:
  `true` if the x500 name describes a daemon

### getUsername

public String getUsername()
Get the username from the x500 name

Returns:
  the name of the user

### getDaemonName

public String getDaemonName()
Get the name of the daemon

Returns:
  the name of the damon or `null` of the name does not describe a daemon