org.databene.benerator.util
Class SharedGenerator<E>
java.lang.Object
org.databene.benerator.util.AbstractGenerator<P>
org.databene.benerator.wrapper.GeneratorWrapper<E,E>
org.databene.benerator.wrapper.GeneratorProxy<E>
org.databene.benerator.util.SharedGenerator<E>
- All Implemented Interfaces:
- java.io.Closeable, Generator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware
public class SharedGenerator<E>
- extends GeneratorProxy<E>
Proxy for generators that are used by several clients. It forwards all calls to
the real generator except calls to reset()
and close()
to assure
that clients do not interfere with each other. This class may only be applied to
Generator
s of which behaviour does not change in case of a reset.
Created: 20.01.2012 16:28:14
- Since:
- 0.7.6
- Author:
- Volker Bergmann
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SharedGenerator
public SharedGenerator(Generator<E> source)
init
public void init(GeneratorContext context)
- Specified by:
init
in interface Generator<E>
- Overrides:
init
in class GeneratorWrapper<E,E>
reset
public void reset()
- Specified by:
reset
in interface org.databene.commons.Resettable
- Overrides:
reset
in class GeneratorWrapper<E,E>
close
public void close()
- Description copied from interface:
Generator
- Closes the generator. After invocation the state is unavailable.
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in interface Generator<E>
- Overrides:
close
in class GeneratorWrapper<E,E>
Copyright © 2013. All Rights Reserved.