|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.client.filepoller.FilePollerPlugin
public class FilePollerPlugin
FilePollerPlugin polls on a directory in the file system for new files. If one new file is found which meets the required specifications, its content is read and published.
Field Summary | |
---|---|
private ContextNode |
contextNode
|
private Global |
glob
|
private boolean |
isShutdown
|
private static java.util.logging.Logger |
log
|
private java.lang.Object |
mbeanHandle
My JMX registration |
private java.lang.String |
ME
|
private PluginInfo |
pluginConfig
|
private Publisher |
publisherClient
|
Constructor Summary | |
---|---|
FilePollerPlugin()
|
Method Summary | |
---|---|
void |
activate()
Activate this service |
void |
deActivate()
Deactivate the service to standby. |
long |
getDelaySinceLastFileChange()
|
java.lang.String |
getDirectoryName()
|
java.lang.String |
getDiscarded()
|
java.lang.String |
getFileFilter()
|
java.lang.String |
getFilterType()
|
java.lang.String |
getLockExtention()
|
long |
getMaximumFileSize()
|
long |
getPollInterval()
|
java.lang.String |
getSent()
|
java.lang.String |
getType()
The unique name of the plugin (together with the version). |
java.lang.String |
getUsageUrl()
|
java.lang.String |
getVersion()
The version of the plugin |
void |
init(Global global,
PluginInfo pluginInfo)
This method is called by the PluginManager. |
boolean |
isActive()
Access the current state |
boolean |
isCopyOnMove()
|
boolean |
isShutdown()
Check status |
void |
setCopyOnMove(boolean copyOnMove)
|
void |
setDelaySinceLastFileChange(long delaySinceLastFileChange)
|
void |
setDirectoryName(java.lang.String directoryName)
|
void |
setDiscarded(java.lang.String discarded)
|
void |
setFileFilter(java.lang.String fileFilter)
|
void |
setFilterType(java.lang.String filterType)
|
void |
setLockExtention(java.lang.String lockExtention)
|
void |
setMaximumFileSize(long maximumFileSize)
|
void |
setPollInterval(long pollInterval)
|
void |
setSent(java.lang.String sent)
|
void |
setUsageUrl(java.lang.String url)
|
void |
shutdown()
Shutdown the plugin, free resources. |
java.lang.String |
triggerScan()
Triggers a filepoller scan. |
java.lang.String |
usage()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.logging.Logger log
private java.lang.String ME
private Publisher publisherClient
private java.lang.Object mbeanHandle
private ContextNode contextNode
private Global glob
private PluginInfo pluginConfig
private boolean isShutdown
Constructor Detail |
---|
public FilePollerPlugin()
Method Detail |
---|
public void init(Global global, PluginInfo pluginInfo) throws XmlBlasterException
I_Plugin
// An entry in xmlBlaster.properties (in one line): MimeSubscribePlugin[ContentLenFilter][1.0]=\ org.xmlBlaster.engine.mime.demo.ContentLenFilter,\ DEFAULT_MAX_LEN=200,DEFAULT_MIN_LEN=20 // Access it like this: java.util.Properties props = pluginInfo.getParameters(); String maxLen = (String)props.get("DEFAULT_MAX_LEN"); String throwLen = (String)props.get("THROW_EXCEPTION_FOR_LEN");
init
in interface I_Plugin
XmlBlasterException
I_Plugin.init(org.xmlBlaster.util.Global, org.xmlBlaster.util.plugin.PluginInfo)
public java.lang.String getType()
I_AdminPlugin
getType
in interface I_AdminPlugin
getType
in interface I_Plugin
I_Plugin.getType()
public java.lang.String getVersion()
I_AdminPlugin
getVersion
in interface I_AdminPlugin
getVersion
in interface I_Plugin
I_Plugin.getVersion()
public void shutdown() throws XmlBlasterException
I_AdminPlugin
shutdown
in interface I_AdminPlugin
shutdown
in interface I_Plugin
XmlBlasterException
- if an exception occurs. The exception is
handled by the RunLevelManager depending on how the plugin has been
configured with the action:
<action do='STOP' onShutdownRunlevel='2' sequence='5'
onFail='resource.configuration.pluginFailed'>
If onFail is defined to something, the RunLevelManager will stop.I_Plugin.shutdown()
public java.lang.String triggerScan()
FilePollerPluginMBean
triggerScan
in interface FilePollerPluginMBean
public java.lang.String getDirectoryName()
getDirectoryName
in interface FilePollerPluginMBean
public void setDirectoryName(java.lang.String directoryName)
setDirectoryName
in interface FilePollerPluginMBean
directoryName
- The directoryName to set.public java.lang.String getFileFilter()
getFileFilter
in interface FilePollerPluginMBean
public void setFileFilter(java.lang.String fileFilter)
setFileFilter
in interface FilePollerPluginMBean
fileFilter
- The fileFilter to set.public java.lang.String getFilterType()
getFilterType
in interface FilePollerPluginMBean
public void setFilterType(java.lang.String filterType)
setFilterType
in interface FilePollerPluginMBean
filterType
- The filterType to set.public long getMaximumFileSize()
getMaximumFileSize
in interface FilePollerPluginMBean
public void setMaximumFileSize(long maximumFileSize)
setMaximumFileSize
in interface FilePollerPluginMBean
maximumFileSize
- The maximumFileSize to set.public long getPollInterval()
getPollInterval
in interface FilePollerPluginMBean
public void setPollInterval(long pollInterval)
setPollInterval
in interface FilePollerPluginMBean
pollInterval
- The pollInterval to set.public void activate() throws java.lang.Exception
I_AdminService
activate
in interface I_AdminService
java.lang.Exception
public void deActivate()
I_AdminService
deActivate
in interface I_AdminService
public boolean isActive()
I_AdminService
isActive
in interface I_AdminService
public boolean isCopyOnMove()
isCopyOnMove
in interface FilePollerPluginMBean
public void setCopyOnMove(boolean copyOnMove)
setCopyOnMove
in interface FilePollerPluginMBean
copyOnMove
- The copyOnMove to set.public long getDelaySinceLastFileChange()
getDelaySinceLastFileChange
in interface FilePollerPluginMBean
public void setDelaySinceLastFileChange(long delaySinceLastFileChange)
setDelaySinceLastFileChange
in interface FilePollerPluginMBean
delaySinceLastFileChange
- The delaySinceLastFileChange to set.public java.lang.String getDiscarded()
getDiscarded
in interface FilePollerPluginMBean
public void setDiscarded(java.lang.String discarded)
setDiscarded
in interface FilePollerPluginMBean
discarded
- The discarded to set.public java.lang.String getLockExtention()
getLockExtention
in interface FilePollerPluginMBean
public void setLockExtention(java.lang.String lockExtention)
setLockExtention
in interface FilePollerPluginMBean
lockExtention
- The lockExtention to set.public java.lang.String getSent()
getSent
in interface FilePollerPluginMBean
public void setSent(java.lang.String sent)
setSent
in interface FilePollerPluginMBean
sent
- The sent to set.public boolean isShutdown()
I_AdminPlugin
isShutdown
in interface I_AdminPlugin
public java.lang.String usage()
usage
in interface I_AdminUsage
public java.lang.String getUsageUrl()
getUsageUrl
in interface I_AdminUsage
public void setUsageUrl(java.lang.String url)
setUsageUrl
in interface I_AdminUsage
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |