|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.infinityloop.util.log.LogBroadcasterImpl
public class LogBroadcasterImpl
A default implementation of a LogBroadcaster that handles all the housekeeping. It also adds the method broadcast() which sends the passed LogEvent to all subscribers.
| Field Summary | |
|---|---|
protected java.lang.String |
name
A name for this logging instance to allow for better debugging. |
protected de.infinityloop.util.WeakSet |
subscribers
|
| Constructor Summary | |
|---|---|
LogBroadcasterImpl()
|
|
| Method Summary | |
|---|---|
void |
addLogListener(LogListener ls)
Register a new listener with us. |
LogEvent |
broadcast(LogEvent le)
Broadcast a LogEvent to all attached listeners. |
java.lang.String |
getName()
|
void |
removeAllSubscribers()
This method unregisters all LogSubscriber from this LogPublisher. |
void |
removeLogListener(LogListener ls)
Unregister the specified listener. |
void |
setName(java.lang.String name)
|
java.lang.String |
toString()
instance info for debugging |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected de.infinityloop.util.WeakSet subscribers
protected java.lang.String name
| Constructor Detail |
|---|
public LogBroadcasterImpl()
| Method Detail |
|---|
public void addLogListener(LogListener ls)
addLogListener in interface LogBroadcasterls - LogBroadcaster.addLogListener(de.infinityloop.util.log.LogListener)public void removeLogListener(LogListener ls)
removeLogListener in interface LogBroadcasterls - LogBroadcaster.removeLogListener(de.infinityloop.util.log.LogListener)public LogEvent broadcast(LogEvent le)
broadcast in interface LogBroadcasterle - the LogEvent to broadcast.
public void removeAllSubscribers()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public final void setName(java.lang.String name)
name - the name to setpublic final java.lang.String getName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||