Package | Description |
---|---|
com.tailf.dp |
Data provider API package, for implementation of callbacks for validations, actions, transformation etc.
|
com.tailf.dp.annotations |
Annotations and proxy helper classes for callbacks.
|
com.tailf.dp.services |
Service callback specific context and utilities.
|
Modifier and Type | Class and Description |
---|---|
class |
DpCallbackExtendedException
Extended errorcode Exceptions thrown from inside callbacks to
identify problems.
|
class |
DpCallbackWarningException
Warnings thrown from inside callbacks to identify problems.
|
Modifier and Type | Method and Description |
---|---|
void |
DpActionCallback.abort(DpActionTrans actx)
The abort() callback will be called for user initiated abort of an
action.
|
void |
DpTransCallback.abort(DpTrans trans)
This callback is responsible for
undoing whatever was done in the prepare() phase.
|
ConfXMLParam[] |
DpActionCallback.action(DpActionTrans actx,
ConfTag name,
ConfObject[] kp,
ConfXMLParam[] params)
The action() callback receives all the parameters pertaining to the
action: The name argument is a pointer to the action name as defined in
YANG model, the kp argument gives the path through the XML
tree, and finally the params argument is a representation of the
params element of the XML instance document provided with the invocation.
|
void |
DpActionTrans.actionSetTimeout(int timeoutSeconds)
Some action callbacks may require a significantly longer execution time
than others, and this time may not even be possible to determine
statically (e.g.
|
void |
DpDbCallback.activateCheckpointRunning(DpDbContext dbx)
This method should rollback running to the checkpoint created by
addCheckpointRunning().
|
void |
DpDbCallback.addCheckpointRunning(DpDbContext dbx)
This method should be implemented only when ConfD owns the candidate, and
confirmed-commit is enabled.
|
void |
CompletionRangeEnumReply.addEntryKeyValues(List<String> keyList)
Add keys for a list entry.
|
void |
CompletionRangeEnumReply.addEntryKeyValues(String[] keyValues)
Add keys for a list entry.
|
boolean |
DpAuthCallback.auth(DpAuthContext atx)
The auth() callback is invoked with an instance to an authentication
context that provides information about the result of the authentication
so far.
|
void |
DpDbCallback.candidateChkNotModified(DpDbContext dbx)
This method should check to see if the candidate has been modified or
not.
|
void |
DpDbCallback.candidateCommit(DpDbContext dbx,
int timeout)
This method should copy the candidate DB into the running DB.
|
void |
DpDbCallback.candidateConfirmingCommit(DpDbContext dbx)
If the timeout in the candidate_commit() method is != 0, we will be
either invoked here or in the candidateRollbackRunning() method within
timeout seconds.
|
void |
DpDbCallback.candidateReset(DpDbContext dbx)
This method is intended to copy the current running configuration into
the candidate.
|
void |
DpDbCallback.candidateRollbackRunning(DpDbContext dbx)
If for some reason, apart from a timeout, something goes wrong, we get
invoked in the candidateRollbackRunning() method.
|
void |
DpDbCallback.candidateValidate(DpDbContext dbx)
This callback is optional.
|
AuthorizationResult |
DpAuthorizationCallback.checkCommandAccess(DpAuthorizationContext context,
String[] commandTokens,
AuthorizationOperCheck operation)
This callback is invoked for command authorization, i.e.
|
AuthorizationResult |
DpAuthorizationCallback.checkDataAccess(DpAuthorizationContext context,
ConfObject[] kp,
AuthorizationOperCheck operation,
AuthorizationOperCheck how) |
String[] |
DpActionCallback.command(DpActionTrans actx,
String cmdname,
String cmdpath,
String[] params)
The command() callback is invoked for CLI callback commands.
|
void |
DpTransCallback.commit(DpTrans trans)
This callback is responsible for
undoing whatever was done in the prepare() phase.
|
Completion |
DpActionCallback.completion(DpActionTrans actx,
char cliStyle,
String token,
char completionChar,
ConfObject[] kp,
String cmdPath,
String cmdParamId,
ConfQname simpleType,
String extra)
The completion() callback is invoked for CLI completion
and information.
|
void |
DpDbCallback.copyRunningToStartup(DpDbContext dbx)
Copies the 'running' database to 'startup'.
|
int |
DpDataCallback.create(DpTrans trans,
ConfObject[] kp)
This callback creates a new presence container, list entry or empty leaf.
|
Properties |
DpNanoServiceCallback.create(NanoServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque,
Properties componentProperties)
Nano Create callback method.
|
Properties |
DpServiceCallback.create(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque)
Create callback method.
|
void |
DpTrans.dataSetTimeout(int timeoutSeconds)
A data callback should normally complete "quickly", since e.g.
|
void |
DpDbCallback.delCheckpointRunning(DpDbContext dbx)
This method should delete a checkpoint created by addCheckPointRunning().
|
Properties |
DpNanoServiceCallback.delete(NanoServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque,
Properties componentProperties)
Nano Delete callback method.
|
void |
DpDbCallback.deleteConfig(DpDbContext dbx,
int dbname)
Will be called for 'startup' or 'candidate' only.
|
boolean |
DpDataCallback.existsOptional(DpTrans trans,
ConfObject[] kp)
If we have presence containers or optional leafs (empty leafs) without a
type, we cannot use the getElem() callback to read such a leaf - since
the element is typeless.
|
void |
DpTransCallback.finish(DpTrans trans)
This callback is responsible for
releasing resources allocated in the init() phase.
|
int |
DpDataCallback.getAttrs(DpTrans trans,
ConfObject[] kp,
List<ConfAttributeValue> attrList)
This callback only needs to be implemented for callpoints specified for
configuration data, and only if attributes are enabled in the server
configuration (/confdConfig/enableAttributes set to true).
|
ConfObject |
DpDataCallback.getCase(DpTrans trans,
ConfObject[] kp,
ConfObject[] choice)
This callback method needs to return the currently chosen 'case' for a
'choice' construct.
|
ConfValue |
DpDataCallback.getElem(DpTrans trans,
ConfObject[] kp)
This callback method needs to return a specific leaf value.
|
ConfKey |
DpDataCallback.getIteratorKey(DpTrans trans,
ConfObject[] kp,
Object obj)
The following callback is used with the iterators above.
|
ConfObject[] |
DpDataCallback.getIteratorObject(DpTrans trans,
ConfObject[] kp,
Object obj)
The following callback is used with the iterators above.
|
List<ConfObject[]> |
DpDataCallback.getIteratorObjectList(DpTrans trans,
ConfObject[] kp,
Object obj,
Iterator<? extends Object> iterator)
This callback is used in place of getIteratorObject when a
List of objects is requested rather than a single instance. |
ConfDatetime |
DpNotifReplayCallback.getLogAgedTime(DpNotifStream stream)
The callback is called by ConfD/NCS to find out the event time of the
last notification aged out of the log, if any.
|
ConfDatetime |
DpNotifReplayCallback.getLogStartTime(DpNotifStream stream)
The callback is called by ConfD/NCS to find out the log's current start
time, relevant for replay requests.
|
ConfObject[] |
DpDataCallback.getObject(DpTrans trans,
ConfObject[] kp)
The purpose of the callback is to return an array of values,
corresponding to a complete list entry in one swoop.
|
void |
DpActionCallback.init(DpActionTrans actx)
Similar to the init() callback for external data bases.
|
void |
DpTransCallback.init(DpTrans trans)
The callback must indicate which WORKER_SOCKET
should be used for future communications in this transaction.
|
void |
DpTransValidateCallback.init(DpTrans trans) |
Iterator<? extends Object> |
DpDataCallback.iterator(DpTrans trans,
ConfObject[] kp)
This callback makes it possible for ConfD/NCS to traverse a set of list
entries.
|
DpDataFindNextIterator |
DpDataCallback.iterator(DpTrans trans,
ConfObject[] kp,
ConfFindNextType type,
ConfKey key)
This iterator method is a specialization of
DpDataCallback.iterator(DpTrans, ConfObject[])
in that it returns an extended iterator i.e. |
DpDataFindNextIterator |
DpDataCallback.iterator(DpTrans trans,
ConfObject[] kp,
ConfFindNextType type,
ConfKey key,
DpListFilter filter)
Variant of the DpDataFindNextIterator-returning iterator above that may
receive a DpListFilter instance which can be used to filter the list.
|
Iterator<? extends Object> |
DpDataCallback.iterator(DpTrans trans,
ConfObject[] kp,
DpListFilter filter)
Variant of iterator that may receive a DpListFilter which can be used to
filter the list.
|
void |
DpDbCallback.lock(DpDbContext dbx,
int dbname)
This should only be implemented if our database supports locking from
other sources than through ConfD.
|
void |
DpDbCallback.lockPartial(DpDbContext dbx,
int dbname,
int lockid,
ConfObject[][] paths)
This should only be implemented if our database supports locking from
other sources than through ConfD, see
DpDbCallback.lock(DpDbContext,int)
above. |
int |
DpDataCallback.moveAfter(DpTrans trans,
ConfObject[] kp,
ConfKey prevkey)
This callback only needs to be implemented if we provide configuration
data that has YANG lists with a ordered-by user statement.
|
int |
DpDataCallback.numInstances(DpTrans trans,
ConfObject[] kp)
This callback can optionally be implemented.
|
Properties |
DpServiceCallback.postModification(ServiceContext context,
ServiceOperationType operation,
ConfPath path,
Properties opaque)
Post modification callback
If registered this method will be called after a CREATE, UPDATE or
DELETE of the service.
|
Properties |
DpServiceCallback.preLockCreate(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque)
Deprecated.
use
DpServiceCallback.create(ServiceContext context,
NavuNode service, NavuNode root, Properties opaque)
This method is called when a service instance committed due to a create
or update event in the same way as the create() callback. The difference
being that this method is called outside of the transaction lock of the
current transaction making it parallel to other pre_lock_create() service
calls.
Care must be taken by the programmer so that the preLockCreate() is
designed in a thread safe manner.
This method returns a opaque as a Properties object that can be null.
If not null it is stored persistently by Ncs.
This object is then delivered as argument to new calls of the create
method for this service (fastmap algorithm).
This way the user can store and later modify persistent data outside
the service model that might be needed. |
Properties |
DpServiceCallback.preModification(ServiceContext context,
ServiceOperationType operation,
ConfPath path,
Properties opaque)
Pre modification callback
If registered this method will be called before a CREATE, UPDATE or
DELETE of the service.
|
void |
DpTransCallback.prepare(DpTrans trans)
If we have multiple sources of data it is highly recommended
that the callback is implemented.
|
int |
DpDataCallback.remove(DpTrans trans,
ConfObject[] kp)
This callback is used to remove a presence container, list entry or empty
leaf and all its sub elements.
|
void |
DpNotifReplayCallback.replay(DpNotifStream stream,
ConfDatetime start,
ConfDatetime stop)
The replay() callback is called by ConfD/NCS to request replay.
|
void |
DpSnmpInformResponseCallback.result(Integer ref,
ConfETuple target,
Boolean gotResponse)
This callback provides the application with possibility to to take
actions based on the result of an inform request for a specific receiver.
|
String |
DpMountIdInterface.retrieveMountId(Object obj) |
void |
DpDbCallback.runningChkNotModified(DpDbContext dbx)
This function should check to see if running has been modified or not.
|
int |
DpDataCallback.setAttr(DpTrans trans,
ConfObject[] kp,
ConfAttributeValue attr)
This callback also only needs to be implemented for callpoints specified
for configuration data, and only if attributes are enabled in the server
configuration (/confdConfig/enableAttributes set to true).
|
int |
DpDataCallback.setCase(DpTrans trans,
ConfObject[] kp,
ConfObject[] choice,
ConfTag caseval)
This callback method sets the currently chosen 'case' for a 'choice'
construct.
|
int |
DpDataCallback.setElem(DpTrans trans,
ConfObject[] kp,
ConfValue newval)
This callback writes a data leaf.
|
void |
DpTransValidateCallback.stop(DpTrans trans) |
void |
DpSnmpInformResponseCallback.targets(Integer ref,
ConfETuple[] targets)
This callback provides the application with possibility to to take
actions based on the intended targets of an inform request.
|
void |
DpTransCallback.transLock(DpTrans trans)
This callback is invoked when the validation phase of the transaction
starts.
|
void |
DpTransCallback.transUnlock(DpTrans trans)
This callback is called when the validation of the transaction
failed, or the validation is triggered explicitly (i.e.
|
void |
DpDbCallback.unlock(DpDbContext dbx,
int dbname)
Unlocks the database.
|
void |
DpDbCallback.unlockPartial(DpDbContext dbx,
int dbname,
int lockid)
Unlocks the partial locks that where previously locked with
DpDbCallback.lockPartial(DpDbContext,int,int,ConfObject[][]) . |
void |
DpValpointCallback.validate(DpTrans trans,
ConfObject[] kp,
ConfValue newval)
The validate() callback should validate the values and throw a
DpCallbackException if the validation fails. |
int |
DpDataCallback.writeAll(DpTrans trans,
ConfObject[] kp)
This callback method sets the currently chosen 'case' for a 'choice'
construct.
|
void |
DpTransCallback.writeStart(DpTrans trans)
This callback is invoked when the validation succeeded and the
write phase of the transaction starts.
|
Modifier and Type | Method and Description |
---|---|
static DpCallbackException |
ProxyUtils.invocationTargetCheck(InvocationTargetException ex) |
Modifier and Type | Method and Description |
---|---|
void |
ActionCallbackProxy.abort(DpActionTrans actx) |
void |
TransCallbackProxy.abort(DpTrans trans) |
ConfXMLParam[] |
ActionCallbackProxy.action(DpActionTrans actx,
ConfTag name,
ConfObject[] kp,
ConfXMLParam[] params) |
void |
DBCallbackProxy.activateCheckpointRunning(DpDbContext dbx) |
void |
DBCallbackProxy.addCheckpointRunning(DpDbContext dbx) |
boolean |
AuthCallbackProxy.auth(DpAuthContext atx) |
void |
DBCallbackProxy.candidateChkNotModified(DpDbContext dbx) |
void |
DBCallbackProxy.candidateCommit(DpDbContext dbx,
int timeout) |
void |
DBCallbackProxy.candidateConfirmingCommit(DpDbContext dbx) |
void |
DBCallbackProxy.candidateReset(DpDbContext dbx) |
void |
DBCallbackProxy.candidateRollbackRunning(DpDbContext dbx) |
void |
DBCallbackProxy.candidateValidate(DpDbContext dbx) |
AuthorizationResult |
AuthorizationCallbackProxy.checkCommandAccess(DpAuthorizationContext context,
String[] commandTokens,
AuthorizationOperCheck operation) |
AuthorizationResult |
AuthorizationCallbackProxy.checkDataAccess(DpAuthorizationContext context,
ConfObject[] kp,
AuthorizationOperCheck operation,
AuthorizationOperCheck how) |
String[] |
ActionCallbackProxy.command(DpActionTrans actx,
String cmdname,
String cmdpath,
String[] params) |
void |
TransCallbackProxy.commit(DpTrans trans) |
Completion |
ActionCallbackProxy.completion(DpActionTrans actx,
char cliStyle,
String token,
char completionChar,
ConfObject[] kp,
String cmdPath,
String cmdParamId,
ConfQname simpleType,
String extra) |
void |
DBCallbackProxy.copyRunningToStartup(DpDbContext dbx) |
int |
DataCallbackProxy.create(DpTrans trans,
ConfObject[] kp) |
Properties |
NanoServiceCallbackProxy.create(NanoServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque,
Properties componentProperties) |
Properties |
ServiceCallbackProxy.create(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque) |
void |
DBCallbackProxy.delCheckpointRunning(DpDbContext dbx) |
Properties |
NanoServiceCallbackProxy.delete(NanoServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque,
Properties componentProperties) |
Properties |
ServiceCallbackProxy.delete(ServiceContext context,
NavuNode root,
Properties opaque) |
void |
DBCallbackProxy.deleteConfig(DpDbContext dbx,
int dbname) |
boolean |
DataCallbackProxy.existsOptional(DpTrans trans,
ConfObject[] kp) |
void |
TransCallbackProxy.finish(DpTrans trans) |
static ActionCallbackProxy[] |
ActionCallbackProxy.getActionCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
int |
DataCallbackProxy.getAttrs(DpTrans trans,
ConfObject[] kp,
List<ConfAttributeValue> attrList) |
static AuthCallbackProxy[] |
AuthCallbackProxy.getAuthCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
static AuthorizationCallbackProxy[] |
AuthorizationCallbackProxy.getAuthorizationCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
ConfObject |
DataCallbackProxy.getCase(DpTrans trans,
ConfObject[] kp,
ConfObject[] choice) |
static DataCallbackProxy[] |
DataCallbackProxy.getDataCallbackProxys(String mountId,
Object obj)
Get array of proxy objects from registered POJO callback.
|
static DBCallbackProxy[] |
DBCallbackProxy.getDBCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
ConfValue |
DataCallbackProxy.getElem(DpTrans trans,
ConfObject[] kp) |
ConfKey |
DataCallbackProxy.getIteratorKey(DpTrans trans,
ConfObject[] kp,
Object obj) |
ConfObject[] |
DataCallbackProxy.getIteratorObject(DpTrans trans,
ConfObject[] kp,
Object obj) |
List<ConfObject[]> |
DataCallbackProxy.getIteratorObjectList(DpTrans trans,
ConfObject[] kp,
Object obj,
Iterator<? extends Object> iterator) |
static NanoServiceCallbackProxy[] |
NanoServiceCallbackProxy.getNanoServiceCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
ConfObject[] |
DataCallbackProxy.getObject(DpTrans trans,
ConfObject[] kp) |
static ServiceCallbackProxy[] |
ServiceCallbackProxy.getServiceCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
static SnmpInformResponseCallbackProxy[] |
SnmpInformResponseCallbackProxy.getSnmpInformResponseCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
static TransCallbackProxy[] |
TransCallbackProxy.getTransCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
static TransValidateCallbackProxy[] |
TransValidateCallbackProxy.getTransValidateCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
static ValidateCallbackProxy[] |
ValidateCallbackProxy.getValidateCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
void |
ActionCallbackProxy.init(DpActionTrans actx) |
void |
TransCallbackProxy.init(DpTrans trans) |
void |
TransValidateCallbackProxy.init(DpTrans trans) |
Iterator<Object> |
DataCallbackProxy.iterator(DpTrans trans,
ConfObject[] kp) |
DpDataFindNextIterator |
DataCallbackProxy.iterator(DpTrans trans,
ConfObject[] kp,
ConfFindNextType type,
ConfKey key) |
DpDataFindNextIterator |
DataCallbackProxy.iterator(DpTrans trans,
ConfObject[] kp,
ConfFindNextType type,
ConfKey key,
DpListFilter filter) |
Iterator<Object> |
DataCallbackProxy.iterator(DpTrans trans,
ConfObject[] kp,
DpListFilter filter) |
void |
DBCallbackProxy.lock(DpDbContext dbx,
int dbname) |
void |
DBCallbackProxy.lockPartial(DpDbContext dbx,
int dbname,
int lockid,
ConfObject[][] paths) |
int |
DataCallbackProxy.moveAfter(DpTrans trans,
ConfObject[] kp,
ConfKey prevkey) |
int |
DataCallbackProxy.numInstances(DpTrans trans,
ConfObject[] kp) |
Properties |
ServiceCallbackProxy.postModification(ServiceContext context,
ServiceOperationType operation,
ConfPath path,
Properties opaque) |
Properties |
ServiceCallbackProxy.preLockCreate(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque) |
Properties |
ServiceCallbackProxy.preModification(ServiceContext context,
ServiceOperationType operation,
ConfPath path,
Properties opaque) |
void |
TransCallbackProxy.prepare(DpTrans trans) |
int |
DataCallbackProxy.remove(DpTrans trans,
ConfObject[] kp) |
void |
SnmpInformResponseCallbackProxy.result(Integer ref,
ConfETuple target,
Boolean gotResponse) |
void |
DBCallbackProxy.runningChkNotModified(DpDbContext dbx) |
int |
DataCallbackProxy.setAttr(DpTrans trans,
ConfObject[] kp,
ConfAttributeValue attr) |
int |
DataCallbackProxy.setCase(DpTrans trans,
ConfObject[] kp,
ConfObject[] choice,
ConfTag caseval) |
int |
DataCallbackProxy.setElem(DpTrans trans,
ConfObject[] kp,
ConfValue newval) |
void |
TransValidateCallbackProxy.stop(DpTrans trans) |
void |
SnmpInformResponseCallbackProxy.targets(Integer ref,
ConfETuple[] targets) |
void |
TransCallbackProxy.transLock(DpTrans trans) |
void |
TransCallbackProxy.transUnlock(DpTrans trans) |
void |
DBCallbackProxy.unlock(DpDbContext dbx,
int dbname) |
void |
DBCallbackProxy.unlockPartial(DpDbContext dbx,
int dbname,
int lockid) |
Properties |
ServiceCallbackProxy.update(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque) |
void |
ValidateCallbackProxy.validate(DpTrans trans,
ConfObject[] kp,
ConfValue newval) |
int |
DataCallbackProxy.writeAll(DpTrans trans,
ConfObject[] kp) |
void |
TransCallbackProxy.writeStart(DpTrans trans) |
Modifier and Type | Method and Description |
---|---|
void |
NanoServiceContext.setFailed() |
void |
NanoServiceContext.setNotReached() |
void |
NanoServiceContext.setReached() |
void |
ServiceContext.setTimeout(int timeoutSeconds)
The timeout for service calls (pre-modification/create/post-modification)
can be controlled by /services/global-settings/service-callback-timeout.
|