Class Context

  • All Implemented Interfaces:

    
    public class Context
    
                        

    Transaction context to be used on incoming set service requests in order to send reports and the initial response.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      long getTransactionId()
      String getOperationHandle()
      String getSourceMds()
      String getCallerId()
      InstanceIdentifier getInvocationSource()
      LocalMdibAccess getMdibAccess()
      InvocationResponse createSuccessfulResponse(MdibVersion mdibVersion, InvocationState invocationState) Creates a successful initial invocation response based on this context.
      InvocationResponse createSuccessfulResponse(InvocationState invocationState) Creates a successful initial invocation response based on this context with latest MDIB version.
      InvocationResponse createUnsuccessfulResponse(MdibVersion mdibVersion, InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage) Creates an unsuccessful initial invocation response based on this context.
      InvocationResponse createUnsuccessfulResponse(InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage) Creates an unsuccessful initial invocation response based on this context with latest MDIB version.
      void sendSuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState) Sends a successful operation invoked report.
      void sendSuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState, @Nullable() String operationTarget) Sends a successful operation invoked report.
      void sendSuccessfulReport(InvocationState invocationState, @Nullable() String operationTarget) Sends a successful operation invoked report with latest MDIB version.
      void sendSuccessfulReport(InvocationState invocationState) Sends a successful operation invoked report with latest MDIB version.
      void sendUnsuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage) Sends an unsuccessful operation invoked report.
      void sendUnsuccessfulReport(InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage) Sends an unsuccessful operation invoked report with latest MDIB version.
      void sendReport(MdibVersion mdibVersion, InvocationState invocationState, @Nullable() InvocationError invocationError, @Nullable() List<LocalizedText> invocationErrorMessage, @Nullable() String operationTarget) Sends an operation invoked report with the information passed as arguments.
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • createSuccessfulResponse

         InvocationResponse createSuccessfulResponse(MdibVersion mdibVersion, InvocationState invocationState)

        Creates a successful initial invocation response based on this context.

        Parameters:
        mdibVersion - the MDIB version that is put to the response message.
        invocationState - the invocation state that is put to the response message.
        Returns:

        the invocation response object.

      • createSuccessfulResponse

         InvocationResponse createSuccessfulResponse(InvocationState invocationState)

        Creates a successful initial invocation response based on this context with latest MDIB version.

        Parameters:
        invocationState - the invocation state that is put to the response message.
        Returns:

        the invocation response object.

      • createUnsuccessfulResponse

         InvocationResponse createUnsuccessfulResponse(MdibVersion mdibVersion, InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)

        Creates an unsuccessful initial invocation response based on this context.

        Parameters:
        mdibVersion - the MDIB version that is put to the response message.
        invocationState - the invocation state that is put to the response message.
        invocationError - the specified error.
        invocationErrorMessage - a human-readable text to describe the error.
        Returns:

        the invocation response object.

      • createUnsuccessfulResponse

         InvocationResponse createUnsuccessfulResponse(InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)

        Creates an unsuccessful initial invocation response based on this context with latest MDIB version.

        Parameters:
        invocationState - the invocation state that is put to the response message.
        invocationError - the specified error.
        invocationErrorMessage - a human-readable text to describe the error.
        Returns:

        the invocation response object.

      • sendSuccessfulReport

         void sendSuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState)

        Sends a successful operation invoked report.

        Parameters:
        mdibVersion - the MDIB version that is put to the notification message.
        invocationState - the invocation state that is put to the notification message.
      • sendSuccessfulReport

         void sendSuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState, @Nullable() String operationTarget)

        Sends a successful operation invoked report.

        Parameters:
        mdibVersion - the MDIB version that is put to the notification message.
        invocationState - the invocation state that is put to the notification message.
        operationTarget - the operation target if available or null if unknown/irrelevant.
      • sendSuccessfulReport

         void sendSuccessfulReport(InvocationState invocationState, @Nullable() String operationTarget)

        Sends a successful operation invoked report with latest MDIB version.

        Parameters:
        invocationState - the invocation state that is put to the notification message.
        operationTarget - the operation target if available or null if unknown/irrelevant.
      • sendSuccessfulReport

         void sendSuccessfulReport(InvocationState invocationState)

        Sends a successful operation invoked report with latest MDIB version.

        Parameters:
        invocationState - the invocation state that is put to the notification message.
      • sendUnsuccessfulReport

         void sendUnsuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)

        Sends an unsuccessful operation invoked report.

        Parameters:
        mdibVersion - the MDIB version that is put to the notification message.
        invocationState - the invocation state that is put to the notification message.
        invocationError - the specified error.
        invocationErrorMessage - a human-readable text to describe the error.
      • sendUnsuccessfulReport

         void sendUnsuccessfulReport(InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)

        Sends an unsuccessful operation invoked report with latest MDIB version.

        Parameters:
        invocationState - the invocation state that is put to the notification message.
        invocationError - the specified error.
        invocationErrorMessage - a human-readable text to describe the error.
      • sendReport

         void sendReport(MdibVersion mdibVersion, InvocationState invocationState, @Nullable() InvocationError invocationError, @Nullable() List<LocalizedText> invocationErrorMessage, @Nullable() String operationTarget)

        Sends an operation invoked report with the information passed as arguments.

        Parameters:
        mdibVersion - the invocation state that is put to the notification message.
        invocationState - the invocation state to send.
        invocationError - the specified error or null if this is not an error report.
        invocationErrorMessage - a human-readable text to describe the error or null if this is not an error report.
        operationTarget - the operation target if available or null if unknown/irrelevant.