Package com.tailf.dp

Interface DpServiceCallback

All Known Implementing Classes:
ServiceCallbackProxy

public interface DpServiceCallback
This interface is used for the service callbacks.
See Also:
  • Field Details

  • Method Details

    • servicepoint

      String servicepoint()
      The name of the servicepoint
    • mask

      int mask()
      Mask of flags for each method that is supported by this callback:
    • create

      Properties create(ServiceContext context, NavuNode service, NavuNode root, Properties opaque) throws DpCallbackException
      Create callback method. This method is called when a service instance committed due to a create or update event. 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.
      Parameters:
      context - - The current ServiceContext object
      service - - 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.
      Returns:
      Properties the returning opaque instance
      Throws:
      DpCallbackException
    • preModification

      Properties preModification(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) throws DpCallbackException
      Pre modification callback If registered this method will be called before a CREATE, UPDATE or DELETE of the service. This is also called with a service context that is of the original transaction. This implies that changes written into this transaction will stay persistent outside of the fastmap algorithm. I.e. will be left untouched by the fastmap algorithm. This can be useful e.g. for allocations that should be stored and existing also when the service instance is removed.
      Parameters:
      context - - The current ServiceContext object
      operation - - Type of operation (CREATE,UPDATE,DELETE)
      path - - ConfPath object referring to the services path
      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.
      Returns:
      Properties - the returning opaque instance
      Throws:
      DpCallbackException
    • postModification

      Properties postModification(ServiceContext context, ServiceOperationType operation, ConfPath path, Properties opaque) throws DpCallbackException
      Post modification callback If registered this method will be called after a CREATE, UPDATE or DELETE of the service. This is also called with a service context that is of the original transaction. This implies that changes written into this transaction will stay persistent outside of the fastmap algorithm. I.e. will be left untouched by the fastmap algorithm. This can be useful e.g. for allocations that should be stored and existing also when the service instance is removed.
      Parameters:
      context - - The current ServiceContext object
      operation - - Type of operation (CREATE,UPDATE,DELETE)
      path - - ConfPath object referring to the services path
      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.
      Returns:
      Properties - the returning opaque instance
      Throws:
      DpCallbackException