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
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
FileListener
public FileListener()
getFile
public File getFile()
setFile
public void setFile(File file)
setFile
public void setFile(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 IOException
- Throws:
IOException
onEvent
public void onEvent(Event event)
throws Exception
- Description copied from interface:
Listener
- Handle an event.
- Parameters:
event
- The event to handle.
- Throws:
Exception
- Failed to handled event.
evaluate
protected String evaluate(String input)
getProperty
protected Object getProperty(String name)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008-2012 Sonatype. All Rights Reserved.