@Path(value="/logs2") public final class AtomPushOverWebSocketServer extends AbstractAtomBean
JUL handler with Spring instead of properties file. See
AtomPushHandler class for detailed description of parameters. Next to configuration of handler,
Spring bean offers simple configuration of associated loggers that share ATOM push-style handler.
General rules:
converter property is not set explicitly, default converter is
created.loggers property is used, it overrides pair of
logger and level properties; and vice versa.batchSize property is not set or set to wrong value, default batch
size of "1" is used.ATOM push handler with registered with root logger for all levels or log events, pushing one feed per event over the connected websocket, using default conversion methods:
<bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushOverWebSocketBean"
init-method="init">
<property name="level" value="ALL" />
</bean>
ATOM push handler registered with multiple loggers and listening for different levels (see
loggers property description for syntax details). Custom deliverer will take
care of feeds, each of which carries batch of 10 log events:
...
<bean class="org.apache.cxf.jaxrs.ext.logging.atom.AtomPushOverWebSocketServer"
init-method="init">
<property name="loggers" value="
org.apache.cxf:DEBUG,
org.apache.cxf.jaxrs,
org.apache.cxf.bus:ERROR" />
<property name="batchSize" value="10" />
</bean>
AbstractAtomBean.LoggerLevel| Constructor and Description |
|---|
AtomPushOverWebSocketServer()
Creates unconfigured and uninitialized bean.
|
| Modifier and Type | Method and Description |
|---|---|
protected Handler |
createHandler() |
void |
init()
Initializes bean; creates ATOM handler based on current properties state, and attaches handler to
logger(s).
|
void |
setBatchCleanupTime(String batchCleanupTime)
Batch cleanup time in minutes
|
void |
setBatchSize(String batchSize)
Size of batch; empty string for default one element batch.
|
void |
setConverter(Converter converter)
Set initialized converter.
|
void |
setFormat(String format)
Entry data format: "content" or "extension".
|
void |
setMultiplicity(String multiplicity)
Multiplicity of subelement of output: "one" or "many".
|
void |
setOutput(String output)
Conversion output type: "feed" or "entry".
|
void |
setRetryPause(String retryPause)
Retry pause calculation strategy, either "linear" or "exponential".
|
void |
setRetryPauseTime(String time)
Retry pause time (in seconds).
|
void |
setRetryTimeout(String timeout)
Retry timeout (in seconds).
|
org.apache.cxf.jaxrs.ext.StreamingResponse<org.apache.abdera.model.Feed> |
subscribeXmlFeed(String reqid) |
Boolean |
unsubscribeXmlFeed(String key) |
checkInit, getBus, getLoggers, setBus, setLevel, setLogger, setLoggerspublic AtomPushOverWebSocketServer()
init()
must be called.public void init()
AbstractAtomBeaninit in class AbstractAtomBeanpublic void setConverter(Converter converter)
public void setBatchSize(String batchSize)
public void setBatchCleanupTime(String batchCleanupTime)
public void setRetryPause(String retryPause)
public void setRetryPauseTime(String time)
public void setRetryTimeout(String timeout)
public void setOutput(String output)
public void setMultiplicity(String multiplicity)
public void setFormat(String format)
protected Handler createHandler()
createHandler in class AbstractAtomBean@GET
@Produces(value="application/atom+xml")
@Path(value="subscribe")
public org.apache.cxf.jaxrs.ext.StreamingResponse<org.apache.abdera.model.Feed> subscribeXmlFeed(@HeaderParam(value="requestId")
String reqid)
Apache CXF