Package com.tailf.ncs.annotations
Class EventCallbackProxy
Object
com.tailf.ncs.annotations.EventCallbackProxy
- All Implemented Interfaces:
NavuEventCallback
Callback proxy for annotated NavuEventCallback methods This class is used
internally be the NavuEventHandler.registerAnnotatedCallbacks to be able to
invoke (by reflection) the annotated callback method
-
Constructor Summary
ConstructorDescriptionEventCallbackProxy
(Object backupObject, String deviceName, String subscriptionName) Constructor for Callback proxys. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionCapability
(EventCBType eventCBType) Add action capability from annotated callType used to register capabilities on the servervoid
addActionMethod
(String name, Method method) Add callback action method to proxyRetrieve the callback POJORetrieve the callback deviceNamestatic EventCallbackProxy[]
Get array of proxy objects from registered POJO callback.Retrieve the callback deviceNamevoid
notifReceived
(NavuContainer event) This callback method is received to each cdb notification that correspond to the annotated deviceName and subscription name.
-
Constructor Details
-
EventCallbackProxy
Constructor for Callback proxys. Used internally.- Parameters:
backupObject
- registered callback POJOdeviceName
-subscriptionName
-
-
-
Method Details
-
getBackupObject
Retrieve the callback POJO- Returns:
- Object registered callback object
-
getDeviceName
Retrieve the callback deviceName- Returns:
- deviceName string
-
getSubscriptionName
Retrieve the callback deviceName- Returns:
- deviceName string
-
addActionMethod
Add callback action method to proxy- Parameters:
name
- canonical action namemethod
- registered callback method
-
addActionCapability
Add action capability from annotated callType used to register capabilities on the server- Parameters:
eventCBType
- action type
-
getEventCallbackProxys
Get array of proxy objects from registered POJO callback. Used internally at callback registration- Parameters:
obj
- registered Callback POJO- Returns:
- array of EventCallbackProxy
- Throws:
NcsException
-