|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.discovery.IsRemotelyAccessibleAttribute
public final class IsRemotelyAccessibleAttribute
A foundation service discovery attribute which may be used to locate a service based on whether or not it can be accessed by remote clients.
When a service is deployed, an IsRemotelyAccessibleAttribute
will be added to its service discovery configuration. This will enable
one to find a service based on its remotely accessibility configuration.
A foundation service is represented in a SAS Metadata Repository as a
ServiceComponent
metadata element. This element has
an associated Property
whose PropertyName
attribute is "isRemotelyAccessible". This service lookup attribute
represents this property setting.
The Foundation Services Manager plug-in to the SAS Management Console provides the capability to view/edit this property for a foundation service.
Examples are provided to find a service that is:
IsRemotelyAccessibleAttribute
initialized to Boolean.TRUE.
The following example shows how to define a service template that can be used to discover a foundation Authentication service that is accessible to remote clients.
import com.sas.services.discovery.DiscoveryService; import com.sas.services.discovery.IsRemotelyAccessibleAttribute; import com.sas.services.discovery.ServiceAttributeInterface; import com.sas.services.discovery.ServiceTemplate; import com.sas.services.security.AuthenticationServiceInterface; ... // specify the desired service type(s) Class[] desiredServiceTypes = new Class[] { AuthenticationServiceInterface.class}; // specify the optional attributes to be used to qualify a discovery lookup // to include only those services which are accessible to remote clients ServiceAttributeInterface[] serviceAttributes = new ServiceAttributeInterface[] { new IsRemotelyAccessibleAttribute( Boolean.TRUE)}; // is accessible to remote clients // create a service lookup template specifying the required // service interface(s) and a service attribute for a // service that is accessible to remote clients ServiceTemplate serviceTemplate = new ServiceTemplate( desiredServiceTypes, serviceAttributes); // discover a service satisfying the service template AuthenticationServiceInterface authenticationService = (AuthenticationServiceInterface) DiscoveryService.defaultInstance().findService(serviceTemplate);
IsRemotelyAccessibleAttribute
initialized to Boolean.FALSE.
The following example shows how to define a service template that can be used to discover a foundation Authentication service that is not accessible to remote clients.
import com.sas.services.discovery.DiscoveryService; import com.sas.services.discovery.IsRemotelyAccessibleAttribute; import com.sas.services.discovery.ServiceAttributeInterface; import com.sas.services.discovery.ServiceTemplate; import com.sas.services.security.AuthenticationServiceInterface; ... // specify the desired service type(s) final Class[] desiredServiceTypes = new Class[] { AuthenticationServiceInterface.class}; // specify the optional attributes to be used to qualify a discovery lookup // to include only those services which are not accessible to remote clients final ServiceAttributeInterface[] serviceAttributes = new ServiceAttributeInterface[] { new IsRemotelyAccessibleAttribute( Boolean.FALSE)}; // not accessible to remote clients // create a service lookup template specifying the required // service interface(s) and a service attribute for a // service that is not accessible to remote clients final ServiceTemplate serviceTemplate = new ServiceTemplate( desiredServiceTypes, serviceAttributes); // discover a service satisfying the service template final AuthenticationServiceInterface authenticationService = (AuthenticationServiceInterface) DiscoveryService.defaultInstance().findService(serviceTemplate);
Field Summary | |
---|---|
java.lang.Boolean |
isRemotelyAccessible
An ID associated with a service. |
Constructor Summary | |
---|---|
IsRemotelyAccessibleAttribute()
Constructs a default instance with a null
indicating that it is unknown whether or not the service
is intended to be remotely accessible. |
|
IsRemotelyAccessibleAttribute(java.lang.Boolean attributeIsRemotelyAccessible)
Constructs an instance initialized with a flag indicating whether or not the service is intended to be accessed remotely. |
Method Summary | |
---|---|
java.util.Map |
getFieldNameToValueMap()
Gets a map of this attribute's fields and their values. |
Methods inherited from class com.sas.services.AbstractServiceAttribute |
---|
equals, hashCode, toString |
Field Detail |
---|
public java.lang.Boolean isRemotelyAccessible
Constructor Detail |
---|
public IsRemotelyAccessibleAttribute()
null
indicating that it is unknown whether or not the service
is intended to be remotely accessible.
public IsRemotelyAccessibleAttribute(java.lang.Boolean attributeIsRemotelyAccessible)
attributeIsRemotelyAccessible
- Boolean.TRUE
if the service is intended
to be accessed remotely, Boolean.FALSE
if the service is not intended to be accessed remotely.
Specify null
if remote accessibility is
a don't care.Method Detail |
---|
public java.util.Map getFieldNameToValueMap()
getFieldNameToValueMap
in class AbstractServiceAttribute
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |