Package org.jboss.resteasy.tracing.api
Class RESTEasyTracingInfo
- java.lang.Object
-
- org.jboss.resteasy.tracing.api.RESTEasyTracingInfo
-
- Direct Known Subclasses:
TextBasedRESTEasyTracingInfo
public abstract class RESTEasyTracingInfo extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static RESTEasyTracingInfoDEFAULTprotected static ServiceLoader<RESTEasyTracingInfo>INSTANCES
-
Constructor Summary
Constructors Constructor Description RESTEasyTracingInfo()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddMessage(RESTEasyTracingMessage message)Add a message to the queue to be processed.abstract StringformatDuration(long duration)static RESTEasyTracingInfoget(String format)abstract String[]getMessages()protected booleanisEmpty()Checks if there are currently messages in the queue.protected List<RESTEasyTracingMessage>pop()Returns an immutable copy of the current messages in the queue and clears the messages from the queue.protected intsize()Returns the number of the messages in the queue.abstract booleansupports(RESTEasyTracingInfoFormat format)
-
-
-
Field Detail
-
INSTANCES
protected static final ServiceLoader<RESTEasyTracingInfo> INSTANCES
-
DEFAULT
protected static final RESTEasyTracingInfo DEFAULT
-
-
Method Detail
-
get
public static RESTEasyTracingInfo get(String format)
-
supports
public abstract boolean supports(RESTEasyTracingInfoFormat format)
-
getMessages
public abstract String[] getMessages()
-
addMessage
public final void addMessage(RESTEasyTracingMessage message)
Add a message to the queue to be processed.- Parameters:
message- the message to add
-
formatDuration
public abstract String formatDuration(long duration)
-
isEmpty
protected final boolean isEmpty()
Checks if there are currently messages in the queue.- Returns:
trueif there are messages in the queue, otherwisefalseif the queue is empty
-
size
protected final int size()
Returns the number of the messages in the queue.- Returns:
- the number of messages in the queue
-
pop
protected final List<RESTEasyTracingMessage> pop()
Returns an immutable copy of the current messages in the queue and clears the messages from the queue.- Returns:
- an immutable copy of the messages
-
-