|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IConfService
It's a main Configuration Service interface of Configuration Object Model Application Block.
It declares operations like:
ConfServiceFactory
is the starting point for initialization
and getting of configuration service instances.
ConfServiceFactory
Method Summary | ||
---|---|---|
|
beginRetrieveMultipleObjects(java.lang.Class<T> cls,
ICfgQuery query,
Action<AsyncRequestResult<T>> finishCallback)
Begins to asynchronously retrieve a list of objects based on the specified query. |
|
|
beginRetrieveMultipleObjects(java.lang.Class<T> cls,
ICfgQuery query,
Action<java.util.Collection<T>> dataCallback,
Action<AsyncRequestResult<T>> finishCallback)
Begins to asynchronously retrieve a list of objects based on the specified query. |
|
|
beginRetrieveMultipleObjects(java.lang.Class<T> cls,
ICfgQuery query,
Action<java.util.Collection<T>> dataCallback,
Action<AsyncRequestResult<T>> finishCallback,
long timeout)
Starts reading of configuration objects collection from server. |
|
|
createMultipleObjects(ConfDataCollection<? extends ConfObjectBase> confObjects,
java.lang.String[] objectsPaths,
int[] foldersDbids)
Creates collection of COM configuration objects using the passed parameters. |
|
java.util.Collection<ICfgObject> |
createMultipleObjects(ConfObjectsCollection confObjects)
Creates collection of COM configuration objects using the passed parameters. |
|
|
createMultipleObjectsFromXML(org.w3c.dom.Node receivedObjects)
Creates a list of configuration objects based on XML received from Configuration Server |
|
|
createMultipleObjectsFromXML(org.w3c.dom.Node receivedObjects,
java.lang.String[] objectPaths,
int[] folderDbids)
Creates a list of configuration objects based on XML received from Configuration Server. |
|
ICfgObject |
createObject(ConfObjectBase confObject,
boolean isSaved)
Creates a single COM configuration object using the passed parameters. |
|
ICfgObject |
createObject(ConfObjectBase confObject,
java.lang.String objectPath,
int folderDbid,
boolean isSaved)
Wraps a single configuration structure with COM configuration object using the passed parameters. |
|
ICfgObject |
createObjectFromXML(org.w3c.dom.Node confObject,
boolean isSaved)
Creates a single COM configuration object using the passed parameters. |
|
ICfgObject |
createObjectFromXML(org.w3c.dom.Node confObject,
java.lang.String objectPath,
int folderDbid,
boolean isSaved)
Creates a single COM configuration object using the passed parameters. |
|
void |
deleteObject(ICfgObject cfgObject)
Deletes the specified object. |
|
|
endRetrieveMultipleObjects(AsyncRequestResult<T> asyncResult)
Called to retrieve the result of asynchronous RetrieveMultipleObjects operation. |
|
IConfCache |
getCache()
Returns an instance of the configuration cache or null if caching is not enabled. |
|
CfgMetadata |
getMetaData()
Returns reference to the configuration Metadata. |
|
IConfServicePolicy |
getPolicy()
Returns the policy associated with this service. |
|
Protocol |
getProtocol()
Returns a reference to the protocol connection to Configuration Server. |
|
void |
refreshObject(ICfgObject cfgObject)
Refreshes the specified object with the latest information. |
|
|
retrieveMultipleObjects(java.lang.Class<T> cls,
ICfgQuery query)
Retrieves a list of typed objects based on the specified query. |
|
|
retrieveMultipleObjects(java.lang.Class<T> cls,
ICfgQuery query,
long timeout)
Retrieves a list of typed objects based on the specified query. |
|
ICfgObject |
retrieveObject(CfgObjectType objectType,
int dbId)
Retrieves an object based on its dbid and type query. |
|
|
retrieveObject(java.lang.Class<T> cls,
ICfgQuery query)
Retrieves a typed object based on the specified query. |
|
|
retrieveObject(ICfgQuery<T> query)
Retrieves an object based on the specified query. |
|
void |
saveObject(ICfgObject cfgObject)
Updates the specified object. |
|
void |
setBrokerInvoker(AsyncInvoker invoker)
Sets user defined custom invoker for ConfEvent broker. |
|
void |
setInvoker(AsyncInvoker invoker)
Sets user defined custom invoker for callback notifications on asynchronous multiple objects reading operations. |
|
void |
setUserMessageHandler(MessageHandler msgHandler)
Sets extra MessageHandler for custom handling of incoming asynchronous protocol messages on the channel. It will be called in the protocol invoker thread after procession by the ConfService internal handler. |
|
Subscription |
subscribe(ICfgObject obj)
Subscribes to receiving notifications. |
|
Subscription |
subscribe(NotificationQuery query)
Subscribes to receiving notifications. |
|
void |
unsubscribe(Subscription subscription)
Unsubscribes from receiving notifications from Configuration Server. |
Methods inherited from interface com.genesyslab.platform.applicationblocks.commons.broker.SubscriptionService |
---|
register, register, unregister, unregister |
Method Detail |
---|
Protocol getProtocol()
CfgMetadata getMetaData()
IConfCache getCache()
IConfServicePolicy getPolicy()
void saveObject(ICfgObject cfgObject) throws ConfigException
cfgObject
- the object to update
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.void deleteObject(ICfgObject cfgObject) throws ConfigException
cfgObject
- the object to delete
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.void refreshObject(ICfgObject cfgObject) throws ConfigException
cfgObject
- the object to refresh
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalStateException
- if service is already disposed.<T extends ICfgObject> T retrieveObject(ICfgQuery<T> query) throws ConfigException
query
- the query by which to retrieve the object
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalStateException
- if service is already disposed.<T extends ICfgObject> T retrieveObject(java.lang.Class<T> cls, ICfgQuery query) throws ConfigException
T
- The type of object to retrievequery
- the query by which to retrieve the object
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalStateException
- if service is already disposed.ICfgObject retrieveObject(CfgObjectType objectType, int dbId) throws ConfigException
dbId
- the dbid of the object to retrieveobjectType
- the object's type
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalStateException
- if service is already disposed.<T extends ICfgObject> java.util.Collection<T> retrieveMultipleObjects(java.lang.Class<T> cls, ICfgQuery query) throws ConfigException, java.lang.InterruptedException
T
- The type of objects to retrievequery
- the query by which to retrieve the objects
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalArgumentException
- if query type is unsupported.
java.lang.IllegalStateException
- if service is already disposed.
java.lang.InterruptedException
<T extends ICfgObject> java.util.Collection<T> retrieveMultipleObjects(java.lang.Class<T> cls, ICfgQuery query, long timeout) throws ConfigException, java.lang.InterruptedException
T
- The type of objects to retrievequery
- the query by which to retrieve the objectstimeout
- timeout in milliseconds which will be used for waiting messages from server
(excluding parsing time of messages)
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalArgumentException
- if query type is unsupported.
java.lang.IllegalStateException
- if service is already disposed.
java.lang.InterruptedException
<T extends ICfgObject> AsyncRequestResult<T> beginRetrieveMultipleObjects(java.lang.Class<T> cls, ICfgQuery query, Action<AsyncRequestResult<T>> finishCallback) throws ConfigException
setInvoker(AsyncInvoker)
before this method invocation if we have non-null callback.
T
- The type of objects to retrievequery
- the query by which to retrieve the objectsfinishCallback
- the callback to notify when retrieve operation is complete
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalArgumentException
- if query type is unsupported.
java.lang.IllegalStateException
- if service is already disposed.endRetrieveMultipleObjects(AsyncRequestResult)
,
setInvoker(AsyncInvoker)
<T extends ICfgObject> AsyncRequestResult<T> beginRetrieveMultipleObjects(java.lang.Class<T> cls, ICfgQuery query, Action<java.util.Collection<T>> dataCallback, Action<AsyncRequestResult<T>> finishCallback) throws ConfigException
setInvoker(AsyncInvoker)
before this method invocation if we have non-null callback.
T
- The type of objects to retrievequery
- the query by which to retrieve the objectsdataCallback
- the callback to notify when partial data arrivedfinishCallback
- the callback to notify when retrieve operation is complete
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalArgumentException
- if query type is unsupported.
java.lang.IllegalStateException
- if service is already disposed.endRetrieveMultipleObjects(AsyncRequestResult)
,
setInvoker(AsyncInvoker)
<T extends ICfgObject> AsyncRequestResult<T> beginRetrieveMultipleObjects(java.lang.Class<T> cls, ICfgQuery query, Action<java.util.Collection<T>> dataCallback, Action<AsyncRequestResult<T>> finishCallback, long timeout) throws ConfigException
setInvoker(AsyncInvoker)
before this method invocation if we have non-null callback.
T
- specific wrapping class of particular configuration objects typecls
- class used for generic matchingquery
- query for objects readingdataCallback
- user defined callback action for data parts arrival notification or nullfinishCallback
- user defined callback action for data readiness notification or nulltimeout
- timeout in milliseconds which will be used for waiting messages from server
(excluding parsing time of messages)
ConfigException
- in case of problems while reading data from server.
java.lang.IllegalArgumentException
- if query type is unsupported.
java.lang.IllegalStateException
- if service is already disposed.endRetrieveMultipleObjects(AsyncRequestResult)
,
setInvoker(AsyncInvoker)
<T extends ICfgObject> java.util.Collection<T> endRetrieveMultipleObjects(AsyncRequestResult<T> asyncResult) throws ConfigException, java.lang.InterruptedException
asyncResult
- The IAsyncResult object used to track the current request
ConfigException
java.lang.InterruptedException
void setInvoker(AsyncInvoker invoker)
setInvoker
in interface AsyncInvokerSupport
invoker
- user defined invokerbeginRetrieveMultipleObjects(Class, ICfgQuery, Action)
,
beginRetrieveMultipleObjects(Class, ICfgQuery, Action, Action)
void setBrokerInvoker(AsyncInvoker invoker)
invoker
- user defined invoker
java.lang.IllegalStateException
- if service is already disposed.ICfgObject createObjectFromXML(org.w3c.dom.Node confObject, boolean isSaved) throws ConfigException
confObject
- XML describing a single configuration object as received from Configuration ServerisSaved
- Specifies whether the object has been previously saved in the configuration database
ConfigException
- in case of objects instantiation problems.
java.lang.IllegalStateException
- if service is already disposed.ICfgObject createObjectFromXML(org.w3c.dom.Node confObject, java.lang.String objectPath, int folderDbid, boolean isSaved) throws ConfigException
confObject
- XML describing a single configuration object as received from Configuration ServerobjectPath
- The folder path of the object in Configuration ServerfolderDbid
- The DBID of the folder in which the object residesisSaved
- Specifies whether the object has been previously saved in the configuration database
ConfigException
- in case of objects instantiation problems.
java.lang.IllegalStateException
- if service is already disposed.<T extends ICfgObject> java.util.Collection<T> createMultipleObjectsFromXML(org.w3c.dom.Node receivedObjects, java.lang.String[] objectPaths, int[] folderDbids) throws ConfigException
receivedObjects
- the XPathNavigable object in the format of the EventObjectsRead.ConfObject propertyobjectPaths
- Array of strings representing a list of paths for the objects in receivedObjects (should be in the same order)folderDbids
- integer array of folder DBIDs, should be in the same order as the receivedObjects list
ConfigException
- in case of objects instantiation problems.
java.lang.IllegalStateException
- if service is already disposed.<T extends ICfgObject> java.util.Collection<T> createMultipleObjectsFromXML(org.w3c.dom.Node receivedObjects) throws ConfigException
receivedObjects
- the XPathNavigable object in the format of the EventObjectsRead.ConfObject property
ConfigException
- in case of objects instantiation problems.
java.lang.IllegalStateException
- if service is already disposed.ICfgObject createObject(ConfObjectBase confObject, java.lang.String objectPath, int folderDbid, boolean isSaved) throws ConfigException
confObject
- initial content of the object to be createdobjectPath
- The folder path of the object in Configuration ServerfolderDbid
- The DBID of the folder in which the object residesisSaved
- specifies whether the object has been previously saved in the configuration database
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.
java.lang.IllegalArgumentException
- if given objects structure is null or invalid.ICfgObject createObject(ConfObjectBase confObject, boolean isSaved) throws ConfigException
confObject
- initial content of the object to be createdisSaved
- specifies whether the object has been previously saved in the configuration database
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.
java.lang.IllegalArgumentException
- if given objects structure is null or invalid.<T extends ICfgObject> java.util.Collection<T> createMultipleObjects(ConfDataCollection<? extends ConfObjectBase> confObjects, java.lang.String[] objectsPaths, int[] foldersDbids) throws ConfigException
confObjects
- collection of objects declarations to be created
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.
java.lang.NullPointerException
- if given collection is null.
java.lang.IllegalArgumentException
- if given object structure in the collection is null or invalid.java.util.Collection<ICfgObject> createMultipleObjects(ConfObjectsCollection confObjects) throws ConfigException
confObjects
- collection of objects declarations to be created
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.
java.lang.NullPointerException
- if given collection is null.
java.lang.IllegalArgumentException
- if given object structure in the collection is null or invalid.Subscription subscribe(NotificationQuery query) throws ConfigException
query
- the query specifying the subscription details
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.unsubscribe(Subscription)
Subscription subscribe(ICfgObject obj) throws ConfigException
obj
- the object about which we want to receive notifications
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.unsubscribe(Subscription)
void unsubscribe(Subscription subscription) throws ConfigException
subscription
- reference to a service subscription.
ConfigException
- in case of problems in communication with server.
java.lang.IllegalStateException
- if service is already disposed.subscribe(ICfgObject)
,
subscribe(NotificationQuery)
void setUserMessageHandler(MessageHandler msgHandler)
msgHandler
- user handler
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |