|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
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 (src)
A simple LoggerRepository factory which simply returns the current repository from the LogManager. |
static interface |
Log4jSocketServer.LoggerRepositoryFactory (src)
|
protected class |
Log4jSocketServer.SocketListenerThread (src)
|
| Field Summary | |
protected int |
backlog
The listen backlog count. |
protected java.net.InetAddress |
bindAddress
The address to bind to. |
protected boolean |
listenerEnabled
True if the socket listener is enabled. |
protected Log4jSocketServer.SocketListenerThread (src) |
listenerThread
The socket listener thread. |
protected Log4jSocketServer.LoggerRepositoryFactory (src) |
loggerRepositoryFactory
The factory to create LoggerRepository's for client connections. |
protected int |
port
The port number where the server listens. |
protected java.net.ServerSocket |
serverSocket
The server socket which the listener listens on. |
| Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean (src) |
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()
Sub-classes should override this method to provide custum 'create' logic. |
protected void |
destroyService()
Sub-classes should override this method to provide custum 'destroy' logic. |
int |
getBacklog()
|
java.net.InetAddress |
getBindAddress()
|
LoggerRepository |
getLoggerRepository(java.net.InetAddress addr)
|
java.lang.Class |
getLoggerRepositoryFactoryType()
|
int |
getPort()
|
void |
setBacklog(int backlog)
|
void |
setBindAddress(java.net.InetAddress addr)
|
boolean |
setListenerEnabled()
|
void |
setListenerEnabled(boolean enabled)
|
void |
setLoggerRepositoryFactoryType(java.lang.Class type)
|
void |
setPort(int port)
|
protected void |
startService()
Sub-classes should override this method to provide custum 'start' logic. |
protected void |
stopService()
Sub-classes should override this method to provide custum 'stop' logic. |
| Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
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 (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int port
protected int backlog
protected java.net.InetAddress bindAddress
protected boolean listenerEnabled
protected Log4jSocketServer.SocketListenerThread (src) listenerThread
protected java.net.ServerSocket serverSocket
protected Log4jSocketServer.LoggerRepositoryFactory (src) loggerRepositoryFactory
| Constructor Detail |
public Log4jSocketServer()
| Method Detail |
public void setPort(int port)
public int getPort()
public void setBacklog(int backlog)
public int getBacklog()
public void setBindAddress(java.net.InetAddress addr)
public java.net.InetAddress getBindAddress()
public void setListenerEnabled(boolean enabled)
public boolean setListenerEnabled()
public void setLoggerRepositoryFactoryType(java.lang.Class type)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.ClassCastException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassCastExceptionpublic java.lang.Class getLoggerRepositoryFactoryType()
public LoggerRepository getLoggerRepository(java.net.InetAddress addr)
protected void createService()
throws java.lang.Exception
ServiceMBeanSupport (src) This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
createService in class ServiceMBeanSupport (src) java.lang.Exception
protected void startService()
throws java.lang.Exception
ServiceMBeanSupport (src) This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService in class ServiceMBeanSupport (src) java.lang.Exception
protected void stopService()
throws java.lang.Exception
ServiceMBeanSupport (src) This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService in class ServiceMBeanSupport (src) java.lang.Exception
protected void destroyService()
throws java.lang.Exception
ServiceMBeanSupport (src) This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
destroyService in class ServiceMBeanSupport (src) java.lang.Exception
|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||