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 Type
    Method
    Description
     
    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

      void setTimeout(int timeoutSeconds) throws IOException, DpCallbackException
      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

      NavuNode getServiceNode() throws ConfException
      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

      NavuNode getRootNode() throws ConfException
      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

      String getNedIdByDeviceName(String name) throws ConfException
      Throws:
      ConfException