xmlBlaster 2.2.0 contributions API

org.xmlBlaster.contrib.filewatcher
Class Publisher

java.lang.Object
  extended by org.xmlBlaster.contrib.filewatcher.Publisher
All Implemented Interfaces:
org.xmlBlaster.util.I_Timeout

public class Publisher
extends java.lang.Object
implements org.xmlBlaster.util.I_Timeout

Publisher

Author:
Michele Laghi

Nested Class Summary
 class Publisher.ReplSource
           
 class Publisher.ReplSourceData
           
 
Field Summary
static java.lang.String USE_REGEX
           
 
Constructor Summary
Publisher(org.xmlBlaster.util.Global globOrig, java.lang.String name, I_Info info)
           
 
Method Summary
 void activate()
           
 void deActivate()
           
 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()
           
 void init()
          Connects to the xmlBlaster.
 boolean isActive()
           
 boolean isCopyOnMove()
           
 boolean isRecursive()
           
 void publish()
          Fail-safe sending files.
 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 setRecursive(boolean rec)
           
 void setSent(java.lang.String sent)
           
 void shutdown()
          If an exception occurs it means it could not publish the entry
 void timeout(java.lang.Object userData)
          You will be notified about the timeout through this method.
 java.lang.String toString()
           
 java.lang.String toString(FileInfo[] infos, int max)
          Create a comma separated list of file names.
 java.lang.String triggerScan()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

USE_REGEX

public static final java.lang.String USE_REGEX
See Also:
Constant Field Values
Constructor Detail

Publisher

public Publisher(org.xmlBlaster.util.Global globOrig,
                 java.lang.String name,
                 I_Info info)
          throws org.xmlBlaster.util.XmlBlasterException
Throws:
org.xmlBlaster.util.XmlBlasterException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

init

public void init()
          throws org.xmlBlaster.util.XmlBlasterException
Connects to the xmlBlaster.

Throws:
org.xmlBlaster.util.XmlBlasterException

shutdown

public void shutdown()
              throws org.xmlBlaster.util.XmlBlasterException
If an exception occurs it means it could not publish the entry

Throws:
org.xmlBlaster.util.XmlBlasterException

publish

public void publish()
Fail-safe sending files.


toString

public java.lang.String toString(FileInfo[] infos,
                                 int max)
Create a comma separated list of file names.

Parameters:
infos -
max - Max file names to collect
Returns:

timeout

public void timeout(java.lang.Object userData)
Description copied from interface: org.xmlBlaster.util.I_Timeout
You will be notified about the timeout through this method.

Specified by:
timeout in interface org.xmlBlaster.util.I_Timeout
Parameters:
userData - You get bounced back your userData which you passed with Timeout.addTimeoutListener()
See Also:
I_Timeout.timeout(java.lang.Object)

activate

public void activate()
              throws java.lang.Exception
Throws:
java.lang.Exception

deActivate

public void deActivate()

isActive

public boolean isActive()

triggerScan

public java.lang.String triggerScan()

getDirectoryName

public java.lang.String getDirectoryName()
Returns:
Returns the directoryName.

setDirectoryName

public void setDirectoryName(java.lang.String directoryName)
Parameters:
directoryName - The directoryName to set.

getFileFilter

public java.lang.String getFileFilter()
Returns:
Returns the fileFilter.

setFileFilter

public void setFileFilter(java.lang.String fileFilter)
Parameters:
fileFilter - The fileFilter to set.

getFilterType

public java.lang.String getFilterType()
Returns:
Returns the filterType.

setFilterType

public void setFilterType(java.lang.String filterType)
Parameters:
filterType - The filterType to set.

getMaximumFileSize

public long getMaximumFileSize()
Returns:
Returns the maximumFileSize.

setMaximumFileSize

public void setMaximumFileSize(long maximumFileSize)
Parameters:
maximumFileSize - The maximumFileSize to set.

getPollInterval

public long getPollInterval()
Returns:
Returns the pollInterval.

setPollInterval

public void setPollInterval(long pollInterval)
Parameters:
pollInterval - The pollInterval to set.

isCopyOnMove

public boolean isCopyOnMove()
Returns:
Returns the copyOnMove.

setCopyOnMove

public void setCopyOnMove(boolean copyOnMove)
Parameters:
copyOnMove - The copyOnMove to set.

getDelaySinceLastFileChange

public long getDelaySinceLastFileChange()
Returns:
Returns the delaySinceLastFileChange.

setDelaySinceLastFileChange

public void setDelaySinceLastFileChange(long delaySinceLastFileChange)
Parameters:
delaySinceLastFileChange - The delaySinceLastFileChange to set.

getDiscarded

public java.lang.String getDiscarded()
Returns:
Returns the discarded.

setDiscarded

public void setDiscarded(java.lang.String discarded)
Parameters:
discarded - The discarded to set.

getLockExtention

public java.lang.String getLockExtention()
Returns:
Returns the lockExtention.

setLockExtention

public void setLockExtention(java.lang.String lockExtention)
Parameters:
lockExtention - The lockExtention to set.

getSent

public java.lang.String getSent()
Returns:
Returns the sent.

setSent

public void setSent(java.lang.String sent)
Parameters:
sent - The sent to set.

isRecursive

public boolean isRecursive()

setRecursive

public void setRecursive(boolean rec)

xmlBlaster 2.2.0 contributions API

Copyright © 1999-2014 The xmlBlaster.org contributers.