Class Context
-
- All Implemented Interfaces:
public class ContextTransaction context to be used on incoming set service requests in order to send reports and the initial response.
-
-
Field Summary
Fields Modifier and Type Field Description public final longtransactionIdpublic final StringoperationHandlepublic final StringsourceMdspublic final StringcallerIdpublic final InstanceIdentifierinvocationSourcepublic final LocalMdibAccessmdibAccess
-
Method Summary
Modifier and Type Method Description longgetTransactionId()StringgetOperationHandle()StringgetSourceMds()StringgetCallerId()InstanceIdentifiergetInvocationSource()LocalMdibAccessgetMdibAccess()InvocationResponsecreateSuccessfulResponse(MdibVersion mdibVersion, InvocationState invocationState)Creates a successful initial invocation response based on this context. InvocationResponsecreateSuccessfulResponse(InvocationState invocationState)Creates a successful initial invocation response based on this context with latest MDIB version. InvocationResponsecreateUnsuccessfulResponse(MdibVersion mdibVersion, InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Creates an unsuccessful initial invocation response based on this context. InvocationResponsecreateUnsuccessfulResponse(InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Creates an unsuccessful initial invocation response based on this context with latest MDIB version. voidsendSuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState)Sends a successful operation invoked report. voidsendSuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState, @Nullable() String operationTarget)Sends a successful operation invoked report. voidsendSuccessfulReport(InvocationState invocationState, @Nullable() String operationTarget)Sends a successful operation invoked report with latest MDIB version. voidsendSuccessfulReport(InvocationState invocationState)Sends a successful operation invoked report with latest MDIB version. voidsendUnsuccessfulReport(MdibVersion mdibVersion, InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Sends an unsuccessful operation invoked report. voidsendUnsuccessfulReport(InvocationState invocationState, InvocationError invocationError, List<LocalizedText> invocationErrorMessage)Sends an unsuccessful operation invoked report with latest MDIB version. voidsendReport(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. StringtoString()-
-
Method Detail
-
getTransactionId
long getTransactionId()
-
getOperationHandle
String getOperationHandle()
-
getSourceMds
String getSourceMds()
-
getCallerId
@Nullable() String getCallerId()
-
getInvocationSource
InstanceIdentifier getInvocationSource()
-
getMdibAccess
LocalMdibAccess getMdibAccess()
-
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.
-
-
-
-