org.opcfoundation.ua.builtintypes
Class ServiceResult

java.lang.Object
  extended by org.opcfoundation.ua.builtintypes.ServiceResult

public class ServiceResult
extends Object

ServiceResult class.


Constructor Summary
ServiceResult()
          Constructor for ServiceResult.
ServiceResult(StatusCode code)
          Constructor for ServiceResult.
ServiceResult(StatusCode code, Throwable e)
          Constructor for ServiceResult.
ServiceResult(UnsignedInteger code)
          Constructor for ServiceResult.
ServiceResult(UnsignedInteger code, Throwable e)
          Constructor for ServiceResult.
 
Method Summary
static String buildExceptionTrace(Throwable e)
          buildExceptionTrace.
 String getAdditionalInfo()
          Getter for the field additionalInfo.
 StatusCode getCode()
          Getter for the field code.
 ServiceResult getInnerResult()
          Getter for the field innerResult.
 LocalizedText getLocalizedText()
          Getter for the field localizedText.
 String getNamespaceUri()
          Getter for the field namespaceUri.
 String getSymbolicId()
          Getter for the field symbolicId.
 boolean isBad()
          isBad.
 boolean isGood()
          isGood.
 void setAdditionalInfo(String additionalInfo)
          Setter for the field additionalInfo.
 void setCode(StatusCode code)
          Setter for the field code.
 void setInnerResult(ServiceResult innerResult)
          Setter for the field innerResult.
 void setLocalizedText(LocalizedText localizedText)
          Setter for the field localizedText.
 void setNamespaceUri(String namespaceUri)
          Setter for the field namespaceUri.
 void setSymbolicId(String symbolicId)
          Setter for the field symbolicId.
static ServiceResult toServiceResult(Throwable t)
          Create service result with stack trace from an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceResult

public ServiceResult()

Constructor for ServiceResult.


ServiceResult

public ServiceResult(StatusCode code)

Constructor for ServiceResult.

Parameters:
code - a StatusCode object.

ServiceResult

public ServiceResult(StatusCode code,
                     Throwable e)

Constructor for ServiceResult.

Parameters:
code - a StatusCode object.
e - a Throwable object.

ServiceResult

public ServiceResult(UnsignedInteger code,
                     Throwable e)

Constructor for ServiceResult.

Parameters:
code - a UnsignedInteger object.
e - a Throwable object.

ServiceResult

public ServiceResult(UnsignedInteger code)

Constructor for ServiceResult.

Parameters:
code - a UnsignedInteger object.
Method Detail

toServiceResult

public static ServiceResult toServiceResult(Throwable t)
Create service result with stack trace from an exception. If exception is ServiceResultException, use its reported status code, if not the error code will be set to Bad_UnexpectedError.

Parameters:
t - throwable
Returns:
service result

isBad

public boolean isBad()

isBad.

Returns:
a boolean.

buildExceptionTrace

public static String buildExceptionTrace(Throwable e)

buildExceptionTrace.

Parameters:
e - a Throwable object.
Returns:
a String object.

isGood

public boolean isGood()

isGood.

Returns:
a boolean.

getAdditionalInfo

public String getAdditionalInfo()

Getter for the field additionalInfo.

Returns:
a String object.

setAdditionalInfo

public void setAdditionalInfo(String additionalInfo)

Setter for the field additionalInfo.

Parameters:
additionalInfo - a String object.

getCode

public StatusCode getCode()

Getter for the field code.

Returns:
a StatusCode object.

setCode

public void setCode(StatusCode code)

Setter for the field code.

Parameters:
code - a StatusCode object.

getInnerResult

public ServiceResult getInnerResult()

Getter for the field innerResult.

Returns:
a ServiceResult object.

setInnerResult

public void setInnerResult(ServiceResult innerResult)

Setter for the field innerResult.

Parameters:
innerResult - a ServiceResult object.

getLocalizedText

public LocalizedText getLocalizedText()

Getter for the field localizedText.

Returns:
a LocalizedText object.

setLocalizedText

public void setLocalizedText(LocalizedText localizedText)

Setter for the field localizedText.

Parameters:
localizedText - a LocalizedText object.

getNamespaceUri

public String getNamespaceUri()

Getter for the field namespaceUri.

Returns:
a String object.

setNamespaceUri

public void setNamespaceUri(String namespaceUri)

Setter for the field namespaceUri.

Parameters:
namespaceUri - a String object.

getSymbolicId

public String getSymbolicId()

Getter for the field symbolicId.

Returns:
a String object.

setSymbolicId

public void setSymbolicId(String symbolicId)

Setter for the field symbolicId.

Parameters:
symbolicId - a String object.


Copyright © 2018. All rights reserved.