Top Description Inners Methods
org.osgi.service.log.stream

public Interface LogStreamProvider

Annotations
@ProviderType
Imports
org.osgi.annotation.versioning.ProviderType, org.osgi.service.log.LogEntry, org.osgi.util.pushstream.PushStream, .QueuePolicyOption

LogStreamProvider service for creating a PushStream of LogEntry objects.
Author
$Id: 2643b141220084055265c65051fbd03ba7653fc6 $

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
LogStreamProvider.Options

Creation options for the PushStream of LogEntry objects.

Method Summary

Modifier and TypeMethod and Description
public PushStream<LogEntry>

Returns:

A PushStream of LogEntry objects.
createStream
(LogStreamProvider.Options...
The options to use when creating the PushStream.
options
)

Create a PushStream of LogEntry objects.

Method Detail

createStreamback to summary
public PushStream<LogEntry> createStream(LogStreamProvider.Options... options)

Create a PushStream of LogEntry objects.

The returned PushStream must:

  • Be buffered with a buffer large enough to contain the history, if included.
  • Have the QueuePolicyOption#DISCARD_OLDEST queue policy option.
  • Use a shared executor.
  • Have a parallelism of one.

When this LogStreamProvider service is released by the obtaining bundle, this LogStreamProvider service must call PushStream#close() on the returned PushStream object if it has not already been closed.

Parameters
options:LogStreamProvider.Options[]

The options to use when creating the PushStream.

Returns:PushStream<LogEntry>

A PushStream of LogEntry objects.

org.osgi.service.log.stream back to summary

public final Enum LogStreamProvider.Options

extends Enum<LogStreamProvider.Options>
Class Inheritance

Creation options for the PushStream of LogEntry objects.

Field Summary

Modifier and TypeField and Description
public static final LogStreamProvider.Options
HISTORY

Include history.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static LogStreamProvider.Options
public static LogStreamProvider.Options[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HISTORYback to summary
public static final LogStreamProvider.Options HISTORY

Include history.

Prime the created PushStream with the available historical LogEntry objects. The number of available LogEntry objects is implementation specific.

The created PushStream will supply the available historical LogEntry objects followed by newly created LogEntry objects.

Constructor Detail

Optionsback to summary
private Options()

Method Detail

valueOfback to summary
public static LogStreamProvider.Options valueOf(String name)
valuesback to summary
public static LogStreamProvider.Options[] values()