Package zipkin2.reporter
Class Component
- java.lang.Object
-
- zipkin2.reporter.Component
-
- All Implemented Interfaces:
Closeable
- Direct Known Subclasses:
AsyncReporter,Sender
public abstract class Component extends Object implements Closeable
Components are object graphs used to compose a zipkin service or client. For example, a storage component might return a query api.Components are lazy in regard to I/O. They can be injected directly to other components, to avoid crashing the application graph if a network service is unavailable.
- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description Component()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckResultcheck()Answers the question: Are operations on this component likely to succeed?voidclose()Closes any network resources created implicitly by the component.
-
-
-
Method Detail
-
check
public CheckResult check()
Answers the question: Are operations on this component likely to succeed?Implementations should initialize the component if necessary. It should test a remote connection, or consult a trusted source to derive the result. They should use least resources possible to establish a meaningful result, and be safe to call many times, even concurrently.
- See Also:
CheckResult.OK
-
close
public void close() throws IOExceptionCloses any network resources created implicitly by the component.For example, if this created a connection, it would close it. If it was provided one, this would close any sessions, but leave the connection open.
- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-