public class ServiceCallbackProxy extends Object implements DpServiceCallback
DpServiceCallback
interface and delegates calls to the registered callback POJO with annotated
methodsM_CREATE, M_DELETE, M_POST_MODIFICATION, M_PRE_LOCK_CREATE, M_PRE_MODIFICATION, M_UPDATE| Constructor and Description |
|---|
ServiceCallbackProxy(Object backupObject,
String servicePoint)
Constructor for Callback proxys.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionCapability(ServiceCBType serviceCBType)
Add action capability from annotated callType used to register
capabilities on the server
|
void |
addActionMethod(String name,
Method method)
Add callback action method to proxy
|
Properties |
create(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque)
Create callback method.
|
Properties |
delete(ServiceContext context,
NavuNode root,
Properties opaque) |
Object |
getBackupObject()
Retrieve the callback POJO
|
static ServiceCallbackProxy[] |
getServiceCallbackProxys(Object obj)
Get array of proxy objects from registered POJO callback.
|
String |
getServicePoint()
Retrieve the callback servicepoint
|
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)
pre lock create callback method.
|
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
|
Properties |
update(ServiceContext context,
NavuNode service,
NavuNode root,
Properties opaque) |
public void addActionCapability(ServiceCBType serviceCBType)
serviceCBType - action typepublic void addActionMethod(String name, Method method)
name - canonical action namemethod - registered callback methodpublic Properties create(ServiceContext context, NavuNode service, NavuNode root, Properties opaque) throws DpCallbackException
DpServiceCallbackcreate in interface DpServiceCallbackcontext - - 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.DpCallbackExceptionpublic Properties delete(ServiceContext context, NavuNode root, Properties opaque) throws DpCallbackException
DpCallbackExceptionpublic Object getBackupObject()
public static ServiceCallbackProxy[] getServiceCallbackProxys(Object obj) throws DpCallbackException
obj - registered Callback POJODpCallbackExceptionpublic String getServicePoint()
public int mask()
DpServiceCallbackmask in interface DpServiceCallbackpublic Properties postModification(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) throws DpCallbackException
DpServiceCallbackpostModification in interface DpServiceCallbackcontext - - 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.DpCallbackExceptionpublic Properties preLockCreate(ServiceContext context, NavuNode service, NavuNode root, Properties opaque) throws DpCallbackException
DpServiceCallbackpreLockCreate in interface DpServiceCallbackcontext - - 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.DpCallbackExceptionpublic Properties preModification(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) throws DpCallbackException
DpServiceCallbackpreModification in interface DpServiceCallbackcontext - - 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.DpCallbackExceptionpublic String servicepoint()
DpServiceCallbackservicepoint in interface DpServiceCallbackpublic Properties update(ServiceContext context, NavuNode service, NavuNode root, Properties opaque) throws DpCallbackException
DpCallbackException