Package com.tailf.progress
Class ProgressTraceNed
Object
com.tailf.progress.ProgressTrace
com.tailf.progress.ProgressTraceNed
 The purpose of  ProgressTraceNed  class
 is to make it easy for a NED to interact with NSO's
 progress trace framework with the concept of spans.
 
ProgressTraceNed(Maapi, String),
 and the device phase is set using
 setPhase(String) method. For example:
 
 ProgressTraceNed progress = new ProgressTraceNed(maapi, "mydev");
 progress.setPhase("connect");
 progress.event("connect");
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionProgressTraceNed(Maapi maapi, String deviceId) Creates a new instance ofProgressTraceNed - 
Method Summary
Modifier and TypeMethodDescriptionvoidevent(Maapi.Verbosity verbosity, String message) Report an eventvoidevent(Maapi.Verbosity verbosity, String message, Attributes attributes) Report an eventvoidReport an eventvoidsetDeviceId(String deviceId) Set a device IDvoidSet a NED phasestartSpan(Maapi.Verbosity verbosity, String message) Start a new spanstartSpan(Maapi.Verbosity verbosity, String message, Attributes attributes, Span[] links) Start a new spanStart a new spanMethods inherited from class com.tailf.progress.ProgressTrace
endSpan, endSpan, getCurrentSpan, setServicePath 
- 
Constructor Details
- 
ProgressTraceNed
Creates a new instance ofProgressTraceNed- Parameters:
 maapi- aMAAPIinstancedeviceId- device ID- Throws:
 ConfException- is thrown if device Id is eithernullor empty
 
 - 
 - 
Method Details
- 
setDeviceId
Set a device ID- Parameters:
 deviceId- the device ID
 - 
setPhase
Set a NED phase- Parameters:
 phase- the NED phase
 - 
event
Report an event- Overrides:
 eventin classProgressTrace- Parameters:
 message- message to report- Throws:
 IOExceptionConfExceptionIOException
 - 
event
Report an event- Overrides:
 eventin classProgressTrace- Parameters:
 verbosity- at which verbosity level the message should be reportedmessage- message to report- Throws:
 ConfException- is thrown if either device Id or device phase is not set.IOException
 - 
event
public void event(Maapi.Verbosity verbosity, String message, Attributes attributes) throws IOException, ConfException Report an event- Overrides:
 eventin classProgressTrace- Parameters:
 verbosity- at which verbosity level the message should be reportedmessage- message to reportattributes- attributes of the events. This can benull.- Throws:
 ConfException- is thrown if either device Id or device phase is not set.IOException
 - 
startSpan
Start a new span- Overrides:
 startSpanin classProgressTrace- Parameters:
 message- message of the span- Returns:
 - a 
Spanobject that is used forProgressTrace.endSpan(com.tailf.progress.Span) - Throws:
 ConfException- is thrown if either device Id or device phase is not set.IOException
 - 
startSpan
Start a new span- Overrides:
 startSpanin classProgressTrace- Parameters:
 verbosity- at which verbosity level the message should be reportedmessage- message of the span- Returns:
 - a 
Spanobject that can used inProgressTrace.endSpan(com.tailf.progress.Span) - Throws:
 ConfException- is thrown if either device Id or device phase is not set.IOException
 - 
startSpan
public Span startSpan(Maapi.Verbosity verbosity, String message, Attributes attributes, Span[] links) throws IOException, ConfException Start a new span- Overrides:
 startSpanin classProgressTrace- Parameters:
 verbosity- at which verbosity level the message should be reportedmessage- message of the spanattributes- attributes of the span This can benull.links- list of linked spans This can benull.- Returns:
 - a 
Spanobject that can used inProgressTrace.endSpan(com.tailf.progress.Span) - Throws:
 ConfException- is thrown if either device Id or device phase is not set.IOException
 
 -