Uses of Class
com.tailf.dp.DpCallbackException
Package
Description
Data provider API package, for implementation of callbacks for validations, actions, transformation etc.
Annotations and proxy helper classes for callbacks.
Service callback specific context and utilities.
-
Uses of DpCallbackException in com.tailf.dp
Modifier and TypeClassDescriptionclass
Extended errorcode Exceptions thrown from inside callbacks to identify problems.class
Warnings thrown from inside callbacks to identify problems.Modifier and TypeMethodDescriptionvoid
DpActionCallback.abort
(DpActionTrans actx) The abort() callback will be called for user initiated abort of an action.void
This callback is responsible for undoing whatever was done in the prepare() phase.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
(String[] keyValues) Add keys for a list entry.void
CompletionRangeEnumReply.addEntryKeyValues
(List<String> keyList) 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.DpAuthorizationCallback.checkCommandAccess
(DpAuthorizationContext context, String[] commandTokens, AuthorizationOperCheck operation) This callback is invoked for command authorization, i.e.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
This callback is responsible for undoing whatever was done in the prepare() phase.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.DpNanoServiceCallback.create
(NanoServiceContext context, NavuNode service, NavuNode root, Properties opaque, Properties componentProperties) Nano Create callback method.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().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
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).DpDataCallback.getCase
(DpTrans trans, ConfObject[] kp, ConfObject[] choice) This callback method needs to return the currently chosen 'case' for a 'choice' construct.DpDataCallback.getElem
(DpTrans trans, ConfObject[] kp) This callback method needs to return a specific leaf value.DpDataCallback.getIteratorKey
(DpTrans trans, ConfObject[] kp, Object obj) The following callback is used with the iterators above.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 aList
of objects is requested rather than a single instance.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.DpNotifReplayCallback.getLogStartTime
(DpNotifStream stream) The callback is called by ConfD/NCS to find out the log's current start time, relevant for replay requests.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
The callback must indicate which WORKER_SOCKET should be used for future communications in this transaction.void
DpDataCallback.iterator
(DpTrans trans, ConfObject[] kp) This callback makes it possible for ConfD/NCS to traverse a set of list entries.DpDataCallback.iterator
(DpTrans trans, ConfObject[] kp, ConfFindNextType type, ConfKey key) This iterator method is a specialization ofDpDataCallback.iterator(DpTrans, ConfObject[])
in that it returns an extended iterator i.e.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.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, seeDpDbCallback.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.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.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
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.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
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
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 withDpDbCallback.lockPartial(DpDbContext,int,int,ConfObject[][])
.void
DpValpointCallback.validate
(DpTrans trans, ConfObject[] kp, ConfValue newval) The validate() callback should validate the values and throw aDpCallbackException
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. -
Uses of DpCallbackException in com.tailf.dp.annotations
Modifier and TypeMethodDescriptionstatic DpCallbackException
ProxyUtils.invocationTargetCheck
(InvocationTargetException ex) Modifier and TypeMethodDescriptionvoid
ActionCallbackProxy.abort
(DpActionTrans actx) void
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) AuthorizationCallbackProxy.checkCommandAccess
(DpAuthorizationContext context, String[] commandTokens, AuthorizationOperCheck operation) AuthorizationCallbackProxy.checkDataAccess
(DpAuthorizationContext context, ConfObject[] kp, AuthorizationOperCheck operation, AuthorizationOperCheck how) String[]
ActionCallbackProxy.command
(DpActionTrans actx, String cmdname, String cmdpath, String[] params) void
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) NanoServiceCallbackProxy.create
(NanoServiceContext context, NavuNode service, NavuNode root, Properties opaque, Properties componentProperties) ServiceCallbackProxy.create
(ServiceContext context, NavuNode service, NavuNode root, Properties opaque) void
DBCallbackProxy.delCheckpointRunning
(DpDbContext dbx) NanoServiceCallbackProxy.delete
(NanoServiceContext context, NavuNode service, NavuNode root, Properties opaque, Properties componentProperties) ServiceCallbackProxy.delete
(ServiceContext context, NavuNode root, Properties opaque) void
DBCallbackProxy.deleteConfig
(DpDbContext dbx, int dbname) boolean
DataCallbackProxy.existsOptional
(DpTrans trans, ConfObject[] kp) void
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.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.DataCallbackProxy.getElem
(DpTrans trans, ConfObject[] kp) DataCallbackProxy.getIteratorKey
(DpTrans trans, ConfObject[] kp, Object obj) 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.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
void
DataCallbackProxy.iterator
(DpTrans trans, ConfObject[] kp) DataCallbackProxy.iterator
(DpTrans trans, ConfObject[] kp, ConfFindNextType type, ConfKey key) DataCallbackProxy.iterator
(DpTrans trans, ConfObject[] kp, ConfFindNextType type, ConfKey key, DpListFilter filter) 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) ServiceCallbackProxy.postModification
(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) ServiceCallbackProxy.preModification
(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) void
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
void
SnmpInformResponseCallbackProxy.targets
(Integer ref, ConfETuple[] targets) void
void
TransCallbackProxy.transUnlock
(DpTrans trans) void
DBCallbackProxy.unlock
(DpDbContext dbx, int dbname) void
DBCallbackProxy.unlockPartial
(DpDbContext dbx, int dbname, int lockid) 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) -
Uses of DpCallbackException in com.tailf.dp.services
Modifier and TypeMethodDescriptionvoid
NanoServiceContext.setFailed()
void
NanoServiceContextImpl.setFailed()
void
NanoServiceContext.setNotReached()
void
NanoServiceContextImpl.setNotReached()
void
NanoServiceContext.setReached()
void
NanoServiceContextImpl.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.void
ServiceContextImpl.setTimeout
(int timeoutSeconds) The timeout for service calls (pre-modification/create/post-modification) can be controlled by /services/global-settings/service-callback-timeout.