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
ServiceRecipient s 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 entrypublic 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 ServiceReference
ctx
- a valid DirContextUtilException
public 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
nameUtilException
public 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
objectUtilException
public ServiceRecipient[] getAllServiceRecipients(javax.naming.directory.DirContext ctx) throws UtilException
ServiceRecipient
belonging to this ServiceReference
.ctx
- a valid DirContextUtilException
public ServiceRecipient[] getAllServiceRecipients(javax.naming.directory.DirContext ctx, java.lang.String[] attrList) throws UtilException
ServiceRecipient
s 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 LDAPEntry
ctx
- a valid DirContextUtilException