|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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_PluginXmlBlasterExceptionI_Plugin.init(org.xmlBlaster.util.Global, org.xmlBlaster.util.plugin.PluginInfo)public java.lang.String getType()
I_AdminPlugin
getType in interface I_AdminPlugingetType in interface I_PluginI_Plugin.getType()public java.lang.String getVersion()
I_AdminPlugin
getVersion in interface I_AdminPlugingetVersion in interface I_PluginI_Plugin.getVersion()
public void shutdown()
throws XmlBlasterException
I_AdminPlugin
shutdown in interface I_AdminPluginshutdown in interface I_PluginXmlBlasterException - 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 FilePollerPluginMBeanpublic java.lang.String getDirectoryName()
getDirectoryName in interface FilePollerPluginMBeanpublic void setDirectoryName(java.lang.String directoryName)
setDirectoryName in interface FilePollerPluginMBeandirectoryName - The directoryName to set.public java.lang.String getFileFilter()
getFileFilter in interface FilePollerPluginMBeanpublic void setFileFilter(java.lang.String fileFilter)
setFileFilter in interface FilePollerPluginMBeanfileFilter - The fileFilter to set.public java.lang.String getFilterType()
getFilterType in interface FilePollerPluginMBeanpublic void setFilterType(java.lang.String filterType)
setFilterType in interface FilePollerPluginMBeanfilterType - The filterType to set.public long getMaximumFileSize()
getMaximumFileSize in interface FilePollerPluginMBeanpublic void setMaximumFileSize(long maximumFileSize)
setMaximumFileSize in interface FilePollerPluginMBeanmaximumFileSize - The maximumFileSize to set.public long getPollInterval()
getPollInterval in interface FilePollerPluginMBeanpublic void setPollInterval(long pollInterval)
setPollInterval in interface FilePollerPluginMBeanpollInterval - The pollInterval to set.
public void activate()
throws java.lang.Exception
I_AdminService
activate in interface I_AdminServicejava.lang.Exceptionpublic void deActivate()
I_AdminService
deActivate in interface I_AdminServicepublic boolean isActive()
I_AdminService
isActive in interface I_AdminServicepublic boolean isCopyOnMove()
isCopyOnMove in interface FilePollerPluginMBeanpublic void setCopyOnMove(boolean copyOnMove)
setCopyOnMove in interface FilePollerPluginMBeancopyOnMove - The copyOnMove to set.public long getDelaySinceLastFileChange()
getDelaySinceLastFileChange in interface FilePollerPluginMBeanpublic void setDelaySinceLastFileChange(long delaySinceLastFileChange)
setDelaySinceLastFileChange in interface FilePollerPluginMBeandelaySinceLastFileChange - The delaySinceLastFileChange to set.public java.lang.String getDiscarded()
getDiscarded in interface FilePollerPluginMBeanpublic void setDiscarded(java.lang.String discarded)
setDiscarded in interface FilePollerPluginMBeandiscarded - The discarded to set.public java.lang.String getLockExtention()
getLockExtention in interface FilePollerPluginMBeanpublic void setLockExtention(java.lang.String lockExtention)
setLockExtention in interface FilePollerPluginMBeanlockExtention - The lockExtention to set.public java.lang.String getSent()
getSent in interface FilePollerPluginMBeanpublic void setSent(java.lang.String sent)
setSent in interface FilePollerPluginMBeansent - The sent to set.public boolean isShutdown()
I_AdminPlugin
isShutdown in interface I_AdminPluginpublic java.lang.String usage()
usage in interface I_AdminUsagepublic java.lang.String getUsageUrl()
getUsageUrl in interface I_AdminUsagepublic void setUsageUrl(java.lang.String url)
setUsageUrl in interface I_AdminUsage
|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||