|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.transport.TransportLoggerFactory
public class TransportLoggerFactory
Singleton class to create TransportLogger objects. When the method getInstance() is called for the first time, a TransportLoggerControlMBean is created and registered. This MBean permits enabling and disabling the logging for all TransportLogger objects at once.
TransportLoggerControlMBean
Field Summary | |
---|---|
static java.lang.String |
defaultLogWriterName
LogWriter that will be used if none is specified. |
Method Summary | |
---|---|
TransportLogger |
createTransportLogger(Transport next)
Creates a TransportLogger object, that will be inserted in the Transport Stack. |
TransportLogger |
createTransportLogger(Transport next,
int id,
org.slf4j.Logger log,
java.lang.String logWriterName,
boolean dynamicManagement,
boolean startLogging,
int jmxport)
Creates a TransportLogger object, that will be inserted in the Transport Stack. |
TransportLogger |
createTransportLogger(Transport next,
org.slf4j.Logger log)
Creates a TransportLogger object, that will be inserted in the Transport Stack. |
TransportLogger |
createTransportLogger(Transport next,
java.lang.String logWriterName,
boolean useJmx,
boolean startLogging,
int jmxport)
Creates a TransportLogger object, that will be inserted in the Transport Stack. |
static TransportLoggerFactory |
getInstance()
Returns a TransportLoggerFactory object which can be used to create TransportLogger objects. |
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String defaultLogWriterName
Method Detail |
---|
public static TransportLoggerFactory getInstance()
public void stop()
public TransportLogger createTransportLogger(Transport next) throws java.io.IOException
next
- The next Transport layer in the Transport stack.
java.io.IOException
public TransportLogger createTransportLogger(Transport next, org.slf4j.Logger log) throws java.io.IOException
next
- The next Transport layer in the Transport stack.log
- The log4j log that will be used by the TransportLogger.
java.io.IOException
public TransportLogger createTransportLogger(Transport next, java.lang.String logWriterName, boolean useJmx, boolean startLogging, int jmxport) throws java.io.IOException
next
- The next Transport layer in the Transport stack.startLogging
- Specifies if this TransportLogger should be initially active or not.logWriterName
- The name or the LogWriter to be used. Different log writers can output
logs with a different format.
java.io.IOException
public TransportLogger createTransportLogger(Transport next, int id, org.slf4j.Logger log, java.lang.String logWriterName, boolean dynamicManagement, boolean startLogging, int jmxport) throws java.io.IOException
next
- The next Transport layer in the Transport stack.id
- The id of the transport logger.log
- The log4j log that will be used by the TransportLogger.logWriterName
- The name or the LogWriter to be used. Different log writers can outputdynamicManagement
- Specifies if JMX will be used to switch on/off the TransportLogger to be created.startLogging
- Specifies if this TransportLogger should be initially active or not. Only has a meaning if
dynamicManagement = true.jmxPort
- the port to be used by the JMX server. It should only be different from 1099 (broker's default JMX port)
when it's a client that is using Transport Logging. In a broker, if the port is different from 1099, 2 JMX servers will
be created, both identical, with all the MBeans.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |