org.apache.cxf.management.web.logging.atom
Class AtomPushOverWebSocketServer

java.lang.Object
  extended by org.apache.cxf.management.web.logging.atom.AbstractAtomBean
      extended by org.apache.cxf.management.web.logging.atom.AtomPushOverWebSocketServer

@Path(value="/logs2")
public final class AtomPushOverWebSocketServer
extends AbstractAtomBean

Bean used to configure 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:

Examples:

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>
 


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.cxf.management.web.logging.atom.AbstractAtomBean
AbstractAtomBean.LoggerLevel
 
Constructor Summary
AtomPushOverWebSocketServer()
          Creates unconfigured and uninitialized bean.
 
Method Summary
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)
           
 
Methods inherited from class org.apache.cxf.management.web.logging.atom.AbstractAtomBean
checkInit, getBus, getLoggers, setBus, setLevel, setLogger, setLoggers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomPushOverWebSocketServer

public AtomPushOverWebSocketServer()
Creates unconfigured and uninitialized bean. To configure setters must be used, then init() must be called.

Method Detail

init

public void init()
Description copied from class: AbstractAtomBean
Initializes bean; creates ATOM handler based on current properties state, and attaches handler to logger(s).

Overrides:
init in class AbstractAtomBean

setConverter

public void setConverter(Converter converter)
Set initialized converter.


setBatchSize

public void setBatchSize(String batchSize)
Size of batch; empty string for default one element batch.


setBatchCleanupTime

public void setBatchCleanupTime(String batchCleanupTime)
Batch cleanup time in minutes


setRetryPause

public void setRetryPause(String retryPause)
Retry pause calculation strategy, either "linear" or "exponential".


setRetryPauseTime

public void setRetryPauseTime(String time)
Retry pause time (in seconds).


setRetryTimeout

public void setRetryTimeout(String timeout)
Retry timeout (in seconds).


setOutput

public void setOutput(String output)
Conversion output type: "feed" or "entry".


setMultiplicity

public void setMultiplicity(String multiplicity)
Multiplicity of subelement of output: "one" or "many".


setFormat

public void setFormat(String format)
Entry data format: "content" or "extension".


createHandler

protected Handler createHandler()
Specified by:
createHandler in class AbstractAtomBean

subscribeXmlFeed

@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)

unsubscribeXmlFeed

@GET
@Produces(value="text/plain")
@Path(value="unsubscribe/{key}")
public Boolean unsubscribeXmlFeed(@PathParam(value="key")
                                                    String key)


Apache CXF