public interface DpServiceCallback
Dp.registerAnnotatedCallbacks(Object)
Modifier and Type | Field and Description |
---|---|
static int |
M_CREATE
Flags for the mask
|
static int |
M_DELETE |
static int |
M_POST_MODIFICATION |
static int |
M_PRE_LOCK_CREATE |
static int |
M_PRE_MODIFICATION |
static int |
M_UPDATE |
Modifier and Type | Method and Description |
---|---|
Properties |
create(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque)
Create callback method.
|
int |
mask()
Mask of flags for each method that is supported by this callback:
DpServiceCallback.M_CREATE
DpServiceCallback.M_UPDATE
DpServiceCallback.M_DELETE
DpServiceCallback.M_PRE_MODIFICATION
DpServiceCallback.M_POST_MODIFICATION
|
Properties |
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 |
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 |
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.
|
String |
servicepoint()
The name of the servicepoint
|
static final int M_CREATE
static final int M_UPDATE
static final int M_DELETE
static final int M_PRE_MODIFICATION
static final int M_POST_MODIFICATION
static final int M_PRE_LOCK_CREATE
String servicepoint()
int mask()
@Deprecated Properties preLockCreate(ServiceContext context, NavuNode service, NavuNode root, Properties opaque) throws DpCallbackException
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.context
- - The current ServiceContext objectservice
- - The NavuNode references the service node.root
- - This NavuNode references the ncs root.opaque
- - Parameter contains a Properties object.
This object may be used to transfer
additional information between consecutive
calls to the create callback. It is always
null in the first call. I.e. when the service
is first created.DpCallbackException
Properties create(ServiceContext context, NavuNode service, NavuNode root, Properties opaque) throws DpCallbackException
context
- - The current ServiceContext objectservice
- - The NavuNode references the service node.root
- - This NavuNode references the ncs root.opaque
- - Parameter contains a Properties object.
This object may be used to transfer
additional information between consecutive
calls to the create callback. It is always
null in the first call. I.e. when the service
is first created.DpCallbackException
Properties preModification(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) throws DpCallbackException
context
- - The current ServiceContext objectoperation
- - Type of operation (CREATE,UPDATE,DELETE)path
- - ConfPath object referring to the services pathopaque
- - Parameter contains a Properties object.
This object may be used to transfer
additional information between consecutive
calls to the create callback. It is always
null in the first call. I.e. when the service
is first created.DpCallbackException
Properties postModification(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) throws DpCallbackException
context
- - The current ServiceContext objectoperation
- - Type of operation (CREATE,UPDATE,DELETE)path
- - ConfPath object referring to the services pathopaque
- - Parameter contains a Properties object.
This object may be used to transfer
additional information between consecutive
calls to the create callback. It is always
null in the first call. I.e. when the service
is first created.DpCallbackException