Allow unit names to be specified.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1887 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -36,6 +36,17 @@ public abstract class RepositoryListenerUnit<T> extends RepositoryUnit
|
|||||||
_listener = listener;
|
_listener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a repository listener unit that will report its results to the
|
||||||
|
* supplied result listener and report the supplied name in
|
||||||
|
* {@link #toString}.
|
||||||
|
*/
|
||||||
|
public RepositoryListenerUnit (String name, ResultListener<T> listener)
|
||||||
|
{
|
||||||
|
super(name);
|
||||||
|
_listener = listener;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to perform our persistent action and generate our result.
|
* Called to perform our persistent action and generate our result.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,6 +27,20 @@ import com.samskivert.util.Invoker;
|
|||||||
*/
|
*/
|
||||||
public abstract class RepositoryUnit extends Invoker.Unit
|
public abstract class RepositoryUnit extends Invoker.Unit
|
||||||
{
|
{
|
||||||
|
/** The default constructor. */
|
||||||
|
public RepositoryUnit ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a RepositoryUnit which will report the supplied name
|
||||||
|
* in {@link #toString}.
|
||||||
|
*/
|
||||||
|
public RepositoryUnit (String name)
|
||||||
|
{
|
||||||
|
super(name);
|
||||||
|
}
|
||||||
|
|
||||||
// from abstract Invoker.Unit
|
// from abstract Invoker.Unit
|
||||||
public boolean invoke ()
|
public boolean invoke ()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user