Package com.tailf.dp.services
Interface ServiceContext
- All Known Subinterfaces:
NanoServiceContext
- All Known Implementing Classes:
ServiceModificationContextImpl
public interface ServiceContext
The service context object.
This class contains methods to get the service and root NavuNodes as
well as method to set the transaction timeout time.
-
Method Summary
Modifier and TypeMethodDescriptiongetNedIdByDeviceName
(String name) Returns the path root as a NavuNode with the NavuContext attached to the ongoing Maapi transaction.Returns the current service path as a NavuNode with the NavuContext attached to the ongoing Maapi transaction.void
setTimeout
(int timeoutSeconds) The timeout for service calls (pre-modification/create/post-modification) can be controlled by /services/global-settings/service-callback-timeout.
-
Method Details
-
setTimeout
The timeout for service calls (pre-modification/create/post-modification) can be controlled by /services/global-settings/service-callback-timeout. Normally this is set to cover the longest possible execution time for any service call. In some rare cases it may still be necessary for a a service method to have longer execution time, and then this function can be used to extend (or shorten) the timeout for the current service invocation. The timeout is given in seconds from the point in time when the function is called.- Parameters:
timeoutSeconds
-- Throws:
IOException
DpCallbackException
-
getServiceNode
Returns the current service path as a NavuNode with the NavuContext attached to the ongoing Maapi transaction.- Returns:
- NavuNode An object representing the service path
- Throws:
ConfException
-
getRootNode
Returns the path root as a NavuNode with the NavuContext attached to the ongoing Maapi transaction.- Returns:
- NavuNode An object representing the service path
- Throws:
ConfException
-
getNedIdByDeviceName
- Throws:
ConfException
-