|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.federation.StandardFederationService
Standard implementation of the federation service interfaces.
Use the newStandardFederationService
static factory method(s),
not the StandardFederationService
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
Nested Class Summary | |
private class |
StandardFederationService.CircularBuffer
|
private class |
StandardFederationService.CircularInputStream
|
private class |
StandardFederationService.CircularOutputStream
|
private class |
StandardFederationService.PipeDescriptor
|
static class |
StandardFederationService.RMIStreamHandler
|
private class |
StandardFederationService.TaskRunner
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardFederationService()
|
Method Summary | |
Persistable |
checkFreshness(Persistable obj)
Determines whether the specified object is an expired or stale proxy. |
QueryResult |
checkFreshness(QueryResult qr)
Traverses a QueryResult and determines whether any of the objects contained within it are expired or stale proxies. |
static void |
commandDelegateFeedbackHandler(Group eventMessageData)
|
Federated |
createProxy(Federated proxy)
Creates a proxy object (for migration of LDAP WTUsers to ProxyUsers). |
Group |
doAction(String action,
Object[][] argv,
FeedbackSpec feedbackSpec)
Executes one or more Info*Engine tasks selected by a logical action name, and the types and physical locations of a specific set of objects passed as parameters. |
protected void |
enqueueRefreshRequest(Federated proxy)
Enqueues a request to refresh a proxy object. |
InputStream |
executeHTTPRequest(String method,
String urlString,
String payload)
Executes a specified HTTP request against a specified resource and returns the HTTP response. |
InputStream |
executeHTTPRequest(String method,
String urlString,
String contentType,
byte[] payload)
Executes a specified HTTP request against a specified resource and returns the HTTP response. |
QueryResult |
findObjects(Class targetLinkClass,
Persistable obj1,
String obj1Role,
Persistable obj2)
Returns all link objects that exist between two specified source objects in all known services. |
QueryResult |
findObjects(Class targetLinkClass,
Persistable obj1,
String obj1Role,
Persistable obj2,
Enumeration services)
Returns all link objects that exist between two specified source objects in a specified set of services. |
QueryResult |
findObjects(QuerySpec qs)
Sends a query to all federated services, and returns the merged set of results. |
QueryResult |
findObjects(QuerySpec qs,
Enumeration services,
boolean searchLocalDB)
Sends a query to each of the specified federated services, and returns the merged set of results. |
QueryResult |
findObjects(QuerySpec qs,
String serviceName)
Sends a query to the specified federated service, and returns the results. |
QueryResult |
findObjects(QuerySpec qs,
String[] serviceNames)
Sends a query to each of the specified federated services, and returns the merged set of results. |
QueryResult |
findObjects(QuerySpec qs,
String[] serviceNames,
boolean searchLocalDB)
Sends a query to each of the specified federated services, and returns the merged set of results. |
private static ObjectVector |
findPersistables(ObjectVector objectVector)
|
QueryResult |
getAllServiceObjects()
Returns an enumeration of all known FederatedService objects. |
String[] |
getAllServices()
Returns an array of the names of all known federated services. |
private static String |
getAuthorization(URL url)
Get the authorization string that allows the user to access a specified URL. |
String |
getConceptualClassname()
Deprecated. |
private static String |
getDefaultAuthorization(String realm)
Get the default authorization string that allows the user to access a specified URL. |
Properties |
getFederationProperties()
Get a properties object that contains properties from the federation properties file. |
FeedbackSpec |
getFeedbackSpec()
Returns the feedback specification object associated with the method context. |
Federatable |
getLocalObject(String remoteObjId,
String repositoryName)
Retrieves the local object with the given remote object identifier in the given repository. |
String[] |
getNavigableServices(String linkClassName)
Returns an array of the names of federated services that support navigating a specified link class. |
Persistable |
getPersistentInstance(Federated proxy)
Returns a persisted instance of the specified proxy object or null if the proxy has no persisted instance. |
String[] |
getQueryableServices(String className)
Returns an array of the names of federated services that support querying a specified class. |
FederatedService |
getService(Federated proxy)
Returns an instance of the FederatedService object referenced by the serviceId attribute of the specified proxy object. |
QueryResult |
getServiceObjects(String[] serviceNames)
Returns an enumeration of the service objects associated with the specified service names. |
Ufid |
getUfid(Federatable object)
Retrieves the ufid for the Federatable object. |
static void |
initInfoEngineProperties()
|
InputStream |
invokeInfoEngineTemplate(String url)
Sends a request to Info*Engine to execute the specified template. |
InputStream |
invokeInfoEngineTemplate(String url,
Hashtable params)
Sends a request to Info*Engine to execute the specified template, optionally providing parameters in URL-encoded form data. |
QueryResult |
navigate(Persistable obj,
String role,
Class linkClass,
boolean onlyOtherSide)
Returns objects associated with the specified source object in all known services given a role and a link class. |
QueryResult |
navigate(Persistable obj,
String role,
Class linkClass,
boolean onlyOtherSide,
Enumeration services)
Returns objects associated with the specified source object in the specified list of services given a role and a link class. |
QueryResult |
navigate(Persistable obj,
String role,
QuerySpec criteria,
boolean onlyOtherSide)
Returns objects associated with the specified source object in all known services given a role and selection critieria. |
QueryResult |
navigate(Persistable obj,
String role,
QuerySpec criteria,
boolean onlyOtherSide,
Enumeration services)
Returns objects associated with the specified source object in the specified list of services given a role and selection critieria. |
static StandardFederationService |
newStandardFederationService()
Default factory for the class. |
protected void |
performStartupProcess()
Overrides the startup process specific to the federation service to provide custom startup for event subscription. |
void |
refresh(Federated proxy)
Refreshes the properties of a proxy object. |
void |
refreshIfStale(Federated proxy)
Refreshes the properties of a proxy object, but only if the object is stale. |
static Federated |
refreshProxy(Federated proxy)
Refreshes a proxy object by calling its refresh method. |
static Federated |
refreshProxy(ObjectIdentifier oid)
Refreshes a proxy object by calling its refresh method. |
Vector |
retrieveInfoEngineObjects(String url)
Sends a request to Info*Engine to retrieve objects associated with the specified URL. |
void |
sendFeedback(MethodFeedback feedbackObject)
Sends Feedback objects to the client. |
static void |
setInfoEngineProperties()
This method sets Info*Engine properties in the System properties object. |
Federated |
storeProxy(Federated proxy)
Stores a proxy object in the persistent data service. |
void |
storeUfid(Federatable object,
String remoteId,
String location)
Stores a ufid for the given Federatable. |
void |
syncObjects(Externalizable source,
Externalizable target)
Copies the properties of a specified source object to a target object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final int ARGV_NAME
private static final int ARGV_VALUE
private static final String AUTH_PROPERTY_PREFIX
private static final String CMD_DELEGATE_FEEDBACK_EMIT_TASK_DEFAULT
private static final String EVENT_PROPERTY_PREFIX
private static final String FFI_SEPARATOR
private static final String TASK_DISPATCHER_ACTION
private static final String TASK_DISPATCHER_CLIMBER
private static final String TASK_DISPATCHER_GROUP_IN
private static final String TASK_DISPATCHER_GROUP_OUT_NAME
private static final String TASK_DISPATCHER_GROUP_OUT
private static final String TASK_DISPATCHER_GROUP_VDB
private static final String TASK_DISPATCHER_ID_META_ATTR
private static final String TASK_DISPATCHER_PARAM
private static final String TASK_DISPATCHER_TASKSURL
private static final String TASK_DISPATCHER_TASK_DEFAULT
private static final String TASK_DISPATCHER_TYPE_META_ATTR
private static final String TYPE_HIERARCHY_CLIMBER_DEFAULT
private static String credentialsMapper
private static String credentialsTTL
private static Properties federationProperties
private static String keyAlgorithm
private static String keyPassword
private static String keyProvider
private static String keystorePassword
private static String keystorePath
private static String keystoreProvider
private static String keystoreType
private static String iePropertyResource
private static String ieVMName
private static String namingServiceName
private static String proxyRefreshQueueName
private static long proxyRefreshQueueInterval
private static String SAXDriver
private static String secureProtocol
private static String startupTask
private static String taskCodebase
private static String taskRoot
private static String taskSignerPassword
private static String trustAlgorithm
private static String trustProvider
private static int CHUNK_SIZE
private static String CMD_DELEGATE_FEEDBACK_EMIT_TASK
private static boolean LISTENERS_ENABLED
private static String TASK_DISPATCHER_TASK
private static String TASKS_ROOT_LDAP_URL
private static String TASK_SIGNER
private static String TYPE_HIERARCHY_CLIMBER
private static boolean VERBOSE
public static final String FEDERATED_FEEDBACK_ID_KEY
public static final String FEEDBACK_SPEC_KEY
public static final String TASK_EMIT_EVENT_CONTEXT_ID_ATT
public static final String TASK_EMIT_EVENT_FEEDBACK_ATT
public static final String TASK_EMIT_EVENT_GROUP_NAME
public static final String TASK_EMIT_EVENT_VMNAME_ATT
public static boolean infoEngineInitialized
public static String queueInterlock
public static Hashtable streamRegistry
Constructor Detail |
public StandardFederationService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
public static Federated refreshProxy(Federated proxy) throws FederationServicesException
proxy
-
FederationServicesException
public static Federated refreshProxy(ObjectIdentifier oid) throws FederationServicesException
oid
-
FederationServicesException
public static StandardFederationService newStandardFederationService() throws WTException
WTException
public Federated createProxy(Federated proxy) throws FederationServicesException, WTException
createProxy
in interface FederationService
proxy
- the object to be persisted.
FederationServicesException
WTException
public Group doAction(String action, Object[][] argv, FeedbackSpec feedbackSpec) throws FederationServicesException, WTException
See the FederationHelper class doAction() method for a complete description.
Supported API: false
doAction
in interface FederationService
action
- The action to perform.argv
- Variable argument list.feedbackSpec
- The feedback specification object.
FederationServicesException
WTException
public QueryResult findObjects(QuerySpec qs) throws FederationServicesException, WTException
findObjects
in interface FederationService
qs
- the search criteria to use for the query.
FederationServicesException
WTException
public QueryResult findObjects(QuerySpec qs, String serviceName) throws FederationServicesException, WTException
findObjects
in interface FederationService
qs
- the search criteria to use for the query.serviceName
- the name of the federated service to be queried.
FederationServicesException
WTException
public QueryResult findObjects(QuerySpec qs, String[] serviceNames) throws FederationServicesException, WTException
findObjects
in interface FederationService
qs
- the search criteria to use for the query.serviceNames
- the names of the federated services to be queried.
FederationServicesException
WTException
public QueryResult findObjects(QuerySpec qs, String[] serviceNames, boolean searchLocalDB) throws FederationServicesException, WTException
findObjects
in interface FederationService
qs
- the search criteria to use for the query.serviceNames
- the names of the federated services to be queried.searchLocalDB
- set to true if the local system should be queried.
FederationServicesException
WTException
public QueryResult findObjects(QuerySpec qs, Enumeration services, boolean searchLocalDB) throws FederationServicesException, WTException
findObjects
in interface FederationService
qs
- the search criteria to use for the query.services
- an enumeration of the federated services to be queried.searchLocalDB
- set to true if the local system should be queried.
FederationServicesException
WTException
public QueryResult findObjects(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2) throws FederationServicesException, WTException
findObjects
in interface FederationService
targetLinkClass
- the object class defining the association type.obj1
- the first object.obj1Role
- the role played by the first object in the association.obj2
- the second object.
FederationServicesException
WTException
public QueryResult findObjects(Class targetLinkClass, Persistable obj1, String obj1Role, Persistable obj2, Enumeration services) throws FederationServicesException, WTException
findObjects
in interface FederationService
targetLinkClass
- the object class defining the association type.obj1
- the first object.obj1Role
- the role played by the first object in the association.obj2
- the second object.services
- the set of services to query.
FederationServicesException
WTException
public String[] getAllServices() throws FederationServicesException, WTException
getAllServices
in interface FederationService
FederationServicesException
WTException
public String[] getNavigableServices(String linkClassName) throws FederationServicesException, WTException
getNavigableServices
in interface FederationService
linkClassName
- the name of the class for which navigation is desired.
FederationServicesException
WTException
public Persistable getPersistentInstance(Federated proxy) throws FederationServicesException, WTException
getPersistentInstance
in interface FederationService
proxy
- the proxy object.
FederationServicesException
WTException
public String[] getQueryableServices(String className) throws FederationServicesException, WTException
getQueryableServices
in interface FederationService
className
- the name of the class for which querying is desired.
FederationServicesException
WTException
public FederatedService getService(Federated proxy) throws FederationServicesException, WTException
getService
in interface FederationService
proxy
- the proxy object.
FederationServicesException
WTException
public QueryResult navigate(Persistable obj, String role, Class linkClass, boolean onlyOtherSide) throws FederationServicesException, WTException
navigate
in interface FederationService
obj
- the object for which associated objects are to be returned.role
- the role played in the association by the objects being sought.linkClass
- the link class defining the type of association.onlyOtherSide
- true if only associated objects should be returned, and false if link objects should be returned too.
FederationServicesException
WTException
public QueryResult navigate(Persistable obj, String role, Class linkClass, boolean onlyOtherSide, Enumeration services) throws FederationServicesException, WTException
navigate
in interface FederationService
obj
- the object for which associated objects are to be returned.role
- the role played in the association by the objects being sought.linkClass
- the link class defining the type of association.onlyOtherSide
- true if only associated objects should be returned, and false if link objects should be returned too.services
- an enumeration of the service objects for the services to be queried.
FederationServicesException
WTException
public QueryResult navigate(Persistable obj, String role, QuerySpec criteria, boolean onlyOtherSide) throws FederationServicesException, WTException
navigate
in interface FederationService
obj
- the object for which associated objects are to be returned.role
- the role played in the association by the objects being sought.criteria
- the selection criteria specifying the type of association.onlyOtherSide
- true if only associated objects should be returned, and false if link objects should be returned too.
FederationServicesException
WTException
public QueryResult navigate(Persistable obj, String role, QuerySpec criteria, boolean onlyOtherSide, Enumeration services) throws FederationServicesException, WTException
navigate
in interface FederationService
obj
- the object for which associated objects are to be returned.role
- the role played in the association by the objects being sought.criteria
- the selection criteria specifying the type of association.onlyOtherSide
- true if only associated objects should be returned, and false if link objects should be returned too.services
- an enumeration of the service objects for the services to be queried.
FederationServicesException
WTException
public Vector retrieveInfoEngineObjects(String url) throws FederationServicesException, WTException
retrieveInfoEngineObjects
in interface FederationService
url
- the URL identifying the objects to be retrieved.
FederationServicesException
WTException
public Federated storeProxy(Federated proxy) throws FederationServicesException, WTException
storeProxy
in interface FederationService
proxy
- the object to be persisted.
FederationServicesException
WTException
public void syncObjects(Externalizable source, Externalizable target) throws FederationServicesException, WTException
syncObjects
in interface FederationService
source
- the source object.target
- the target object.
FederationServicesException
WTException
public void storeUfid(Federatable object, String remoteId, String location) throws UfidException, WTException, IEException
storeUfid
in interface FederationService
object
- remoteId
- The unique identifier of the object on the remote system. For an object that resides in an LDAP directory, this will be something like "uid=fred".location
- Represents the name of the repository managing the Federatable. For an object managed by a JNDI adapter, the value of location should be the name of the adapter.
UfidException
WTException
IEException
public Ufid getUfid(Federatable object) throws WTException
getUfid
in interface FederationService
object
-
WTException
public Federatable getLocalObject(String remoteObjId, String repositoryName) throws WTException
getLocalObject
in interface FederationService
remoteObjId
- The unique identifier of the object on the remote system. For principal objects in an LDAP directory, the value of the remobeObjId will be something like "cn=fred".repositoryName
- The name of the repository where the remote object is managed.
WTException
public Persistable checkFreshness(Persistable obj) throws FederationServicesException
checkFreshness
in interface FederationServiceSvr
obj
- the object to be checked.
FederationServicesException
public QueryResult checkFreshness(QueryResult qr) throws FederationServicesException
checkFreshness
in interface FederationServiceSvr
qr
- the QueryResult to be checked.
FederationServicesException
protected void enqueueRefreshRequest(Federated proxy) throws FederationServicesException
proxy
- the proxy object to be refreshed.
FederationServicesException
public InputStream executeHTTPRequest(String method, String urlString, String payload) throws FederationServicesException
executeHTTPRequest
in interface FederationServiceSvr
method
- HTTP request method (GET, POST, PUT, etc.).urlString
- URL of the target resource.payload
- encoded request payload (POST/PUT), null if no payload.
FederationServicesException
public InputStream executeHTTPRequest(String method, String urlString, String contentType, byte[] payload) throws FederationServicesException
executeHTTPRequest
in interface FederationServiceSvr
method
- HTTP request method (GET, POST, PUT, etc.).urlString
- URL of the target resource.contentType
- String stating what is the content-type of the payload.payload
- encoded request payload (POST/PUT), null if no payload.
FederationServicesException
public QueryResult getAllServiceObjects() throws FederationServicesException
getAllServiceObjects
in interface FederationServiceSvr
FederationServicesException
public Properties getFederationProperties()
getFederationProperties
in interface FederationServiceSvr
public FeedbackSpec getFeedbackSpec() throws FederationServicesException
getFeedbackSpec
in interface FederationServiceSvr
FederationServicesException
public InputStream invokeInfoEngineTemplate(String url) throws FederationServicesException
invokeInfoEngineTemplate
in interface FederationServiceSvr
url
- the URL identifying the template to be executed.
FederationServicesException
public InputStream invokeInfoEngineTemplate(String url, Hashtable params) throws FederationServicesException
invokeInfoEngineTemplate
in interface FederationServiceSvr
url
- the URL identifying the template to be executed.params
- Hashtable of parameters to be sent as form data.
FederationServicesException
public void refresh(Federated proxy) throws FederationServicesException
refresh
in interface FederationServiceSvr
proxy
- the proxy object to be refreshed.
FederationServicesException
public void refreshIfStale(Federated proxy) throws FederationServicesException
refreshIfStale
in interface FederationServiceSvr
proxy
- the proxy object to be refreshed.
FederationServicesException
public void sendFeedback(MethodFeedback feedbackObject) throws FederationServicesException
sendFeedback
in interface FederationServiceSvr
feedbackObject
- Required. The feedback object to be sent to the client.
FederationServicesException
private static String getAuthorization(URL url) throws WTException
url
- URL for which authorization information is requested
WTException
private static String getDefaultAuthorization(String realm) throws WTException
realm
- the Host name connecting to
WTException
private static ObjectVector findPersistables(ObjectVector objectVector) throws FederationServicesException
FederationServicesException
public QueryResult getServiceObjects(String[] serviceNames) throws FederationServicesException
serviceNames
- the names of the federated services to be returned.
FederationServicesException
public static void initInfoEngineProperties() throws Exception
Exception
public static void setInfoEngineProperties()
public static void commandDelegateFeedbackHandler(Group eventMessageData)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |