net.grinder.console.distribution
Interface FileDistribution

All Superinterfaces:
FileChangeWatcher
All Known Implementing Classes:
FileDistributionImplementation

public interface FileDistribution
extends FileChangeWatcher

File Distribution. Has a model of the agent cache state, and is a factory for FileDistributionHandlers.

Author:
Philip Aston

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.grinder.console.distribution.FileChangeWatcher
FileChangeWatcher.FileChangedListener
 
Method Summary
 AgentCacheState getAgentCacheState()
          Accessor for our AgentCacheState.
 FileFilter getDistributionFileFilter()
          Return a FileFilter that can be used to test whether the given file is one that will be distributed.
 FileDistributionHandler getHandler()
          Get a FileDistributionHandler for a new file distribution.
 void scanDistributionFiles()
          Scan the given directory for files that have been recently modified.
 void setDirectory(Directory directory)
          Update the distribution directory.
 void setFileFilterPattern(Pattern distributionFileFilterPattern)
          Update the pattern used to filter out files that shouldn't be distributed.
 
Methods inherited from interface net.grinder.console.distribution.FileChangeWatcher
addFileChangedListener
 

Method Detail

getAgentCacheState

AgentCacheState getAgentCacheState()
Accessor for our AgentCacheState.

Returns:
The agent cache state.

getHandler

FileDistributionHandler getHandler()
Get a FileDistributionHandler for a new file distribution.

The FileDistributionHandler updates our simple model of the remote cache state. Callers should only use one FileDistributionHandler at a time for a given FileDistribution. Using multiple instances concurrently will result in undefined behaviour.

Returns:
Handler for new file distribution.

scanDistributionFiles

void scanDistributionFiles()
Scan the given directory for files that have been recently modified. Update the agent cache state appropriately. Notify our listeners if changed files are discovered.


getDistributionFileFilter

FileFilter getDistributionFileFilter()
Return a FileFilter that can be used to test whether the given file is one that will be distributed.

Returns:
The filter.

setDirectory

void setDirectory(Directory directory)
Update the distribution directory.

Parameters:
directory - The base distribution directory.

setFileFilterPattern

void setFileFilterPattern(Pattern distributionFileFilterPattern)
Update the pattern used to filter out files that shouldn't be distributed.

Parameters:
distributionFileFilterPattern - - The filter. Files with names that match this pattern will be filtered out.


Copyright © 2000-2013. All Rights Reserved.