|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.logging.Log4jSocketServer
A Log4j SocketServer service. Listens for client connections on the specified port and creates a new thread and SocketNode to process the incoming client log messages.
The LoggerRepository can be changed based on the clients address by using a custom LoggerRepositoryFactory. The default factory will simply return the current repository.
Nested Class Summary | |
static class |
Log4jSocketServer.DefaultLoggerRepositoryFactory
A simple LoggerRepository factory which simply returns the current repository from the LogManager. |
static interface |
Log4jSocketServer.LoggerRepositoryFactory
|
protected class |
Log4jSocketServer.SocketListenerThread
|
Field Summary | |
protected int |
backlog
The listen backlog count. |
protected InetAddress |
bindAddress
The address to bind to. |
protected boolean |
listenerEnabled
True if the socket listener is enabled. |
protected Log4jSocketServer.SocketListenerThread |
listenerThread
The socket listener thread. |
protected Log4jSocketServer.LoggerRepositoryFactory |
loggerRepositoryFactory
The factory to create LoggerRepository's for client connections. |
protected int |
port
The port number where the server listens. |
protected ServerSocket |
serverSocket
The server socket which the listener listens on. |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
Log4jSocketServer()
|
Method Summary | |
protected void |
createService()
|
protected void |
destroyService()
|
int |
getBacklog()
|
InetAddress |
getBindAddress()
|
org.apache.log4j.spi.LoggerRepository |
getLoggerRepository(InetAddress addr)
|
Class |
getLoggerRepositoryFactoryType()
|
int |
getPort()
|
void |
setBacklog(int backlog)
|
void |
setBindAddress(InetAddress addr)
|
boolean |
setListenerEnabled()
|
void |
setListenerEnabled(boolean enabled)
|
void |
setLoggerRepositoryFactoryType(Class type)
|
void |
setPort(int port)
|
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Field Detail |
protected int port
protected int backlog
protected InetAddress bindAddress
protected boolean listenerEnabled
protected Log4jSocketServer.SocketListenerThread listenerThread
protected ServerSocket serverSocket
protected Log4jSocketServer.LoggerRepositoryFactory loggerRepositoryFactory
Constructor Detail |
public Log4jSocketServer()
Method Detail |
public void setPort(int port)
setPort
in interface Log4jSocketServerMBean
public int getPort()
getPort
in interface Log4jSocketServerMBean
public void setBacklog(int backlog)
setBacklog
in interface Log4jSocketServerMBean
public int getBacklog()
getBacklog
in interface Log4jSocketServerMBean
public void setBindAddress(InetAddress addr)
setBindAddress
in interface Log4jSocketServerMBean
public InetAddress getBindAddress()
getBindAddress
in interface Log4jSocketServerMBean
public void setListenerEnabled(boolean enabled)
setListenerEnabled
in interface Log4jSocketServerMBean
public boolean setListenerEnabled()
setListenerEnabled
in interface Log4jSocketServerMBean
public void setLoggerRepositoryFactoryType(Class type) throws InstantiationException, IllegalAccessException, ClassCastException
setLoggerRepositoryFactoryType
in interface Log4jSocketServerMBean
public Class getLoggerRepositoryFactoryType()
getLoggerRepositoryFactoryType
in interface Log4jSocketServerMBean
public org.apache.log4j.spi.LoggerRepository getLoggerRepository(InetAddress addr)
getLoggerRepository
in interface Log4jSocketServerMBean
protected void createService() throws Exception
Exception
protected void startService() throws Exception
Exception
protected void stopService() throws Exception
Exception
protected void destroyService() throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |