org.sonatype.gossip.listener
Class FileListener
java.lang.Object
org.sonatype.gossip.listener.ListenerSupport
org.sonatype.gossip.listener.FileListener
- All Implemented Interfaces:
- Listener
public class FileListener
- extends ListenerSupport
Writes events to a file.
- Since:
- 1.0
- Author:
- Jason Dillon
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
FileListener
public FileListener()
getFile
public java.io.File getFile()
setFile
public void setFile(java.io.File file)
setFile
public void setFile(java.lang.String fileName)
isAppend
public boolean isAppend()
setAppend
public void setAppend(boolean append)
getBufferSize
public int getBufferSize()
setBufferSize
public void setBufferSize(int n)
getRollingStrategy
public FileListener.RollingStrategy getRollingStrategy()
setRollingStrategy
public void setRollingStrategy(FileListener.RollingStrategy s)
getWriter
public CountingWriter getWriter()
createWriter
protected CountingWriter createWriter()
throws java.io.IOException
- Throws:
java.io.IOException
onEvent
public void onEvent(Event event)
throws java.lang.Exception
- Description copied from interface:
Listener
- Handle an event.
- Parameters:
event
- The event to handle.
- Throws:
java.lang.Exception
- Failed to handled event.
evaluate
protected java.lang.String evaluate(java.lang.String input)
getProperty
protected java.lang.Object getProperty(java.lang.String name)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2008-2011 Sonatype. All Rights Reserved.