public class ServiceReference extends LDAPEntry
This class represents a ServiceReference for a service instance. The ServiceReference contains methods to return the ServiceRecipient and the Service.
| Constructor and Description |
|---|
ServiceReference(javax.naming.directory.DirContext inctx, java.lang.String inputDN)
Constructs a
ServiceReference instance using its DN |
ServiceReference(javax.naming.directory.DirContext inctx, java.lang.String inputDN, PropertySet ps) |
| Modifier and Type | Method and Description |
|---|---|
ServiceRecipient |
createServiceRecipient(javax.naming.directory.DirContext ctx, java.lang.String srName)
Creates a
ServiceRecipient under this service using the name provided |
ServiceRecipient[] |
getAllServiceRecipients(javax.naming.directory.DirContext ctx)
Returns an array of all the
ServiceRecipient belonging to this ServiceReference. |
ServiceRecipient[] |
getAllServiceRecipients(javax.naming.directory.DirContext ctx, java.lang.String[] attrList)
Returns an array of all the
ServiceRecipients belonging to this ServiceReference along with the values of the specified attributes. |
Service |
getServiceInstance(javax.naming.directory.DirContext ctx)
Returns the
Service object corresponding to this ServiceReference |
ServiceRecipient |
getServiceRecipient(javax.naming.directory.DirContext ctx, java.lang.String srName)
Returns the specified
ServiceRecipient object using its name recipient name |
void |
resolve(javax.naming.directory.DirContext ctx)
Resolves the
ServiceReference object by confirming the information of the ServiceRecipient and the Service is available. |
getDN, getProperties, setProperties
public ServiceReference(javax.naming.directory.DirContext inctx,
java.lang.String inputDN)
ServiceReference instance using its DNinctx - a valid DirContextinputDN - the DN of the ServiceReference entry
public ServiceReference(javax.naming.directory.DirContext inctx,
java.lang.String inputDN,
PropertySet ps)
public Service getServiceInstance(javax.naming.directory.DirContext ctx) throws UtilException
Service object corresponding to this ServiceReferencectx - a valid DirContextUtilExceptionpublic ServiceRecipient getServiceRecipient(javax.naming.directory.DirContext ctx, java.lang.String srName) throws UtilException
ServiceRecipient object using its name recipient namectx - a valid DirContextsrName - the ServiceRecipient nameUtilExceptionpublic ServiceRecipient createServiceRecipient(javax.naming.directory.DirContext ctx, java.lang.String srName) throws UtilException
ServiceRecipient under this service using the name providedsrName - name of the service recipent to be createdServiceRecipient objectUtilExceptionpublic ServiceRecipient[] getAllServiceRecipients(javax.naming.directory.DirContext ctx) throws UtilException
ServiceRecipient belonging to this ServiceReference.ctx - a valid DirContextUtilExceptionpublic ServiceRecipient[] getAllServiceRecipients(javax.naming.directory.DirContext ctx, java.lang.String[] attrList) throws UtilException
ServiceRecipients belonging to this ServiceReference along with the values of the specified attributes. These values will be cached in the ServiceRecipient objectsctx - a valid DirContextattrList - a list of attributes to be fetchedUtilException
public void resolve(javax.naming.directory.DirContext ctx)
throws UtilException
ServiceReference object by confirming the information of the ServiceRecipient and the Service is available.resolve in class LDAPEntryctx - a valid DirContextUtilException