org.jtoolkit.essence.utils
Class Factory.AbstractFactory<D,E>

java.lang.Object
  extended by org.jtoolkit.essence.utils.Factory.AbstractFactory<D,E>
All Implemented Interfaces:
java.io.Closeable, Factory<D,E>, Named
Enclosing interface:
Factory<D,E>

public abstract static class Factory.AbstractFactory<D,E>
extends java.lang.Object
implements Factory<D,E>

Base class for factory implementations.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jtoolkit.essence.utils.Factory
Factory.AbstractFactory<D,E>
 
Nested classes/interfaces inherited from interface org.jtoolkit.essence.utils.Named
Named.ContextSource<T>, Named.MapSource<T>, Named.Source<T>
 
Field Summary
protected  java.util.concurrent.atomic.AtomicBoolean closed
           
protected  java.lang.String name
           
 
Constructor Summary
protected Factory.AbstractFactory(java.lang.String name)
           
 
Method Summary
 void close()
           
protected  void finalize()
           
 java.lang.String getName()
           
 void release(E element)
          Release, recycle or dispose of an object this factory created.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jtoolkit.essence.utils.Factory
acquire
 

Field Detail

name

protected final java.lang.String name

closed

protected final java.util.concurrent.atomic.AtomicBoolean closed
Constructor Detail

Factory.AbstractFactory

protected Factory.AbstractFactory(java.lang.String name)
Method Detail

getName

@NotNull
public java.lang.String getName()
Specified by:
getName in interface Named
Returns:
A printable name.

close

public void close()
Specified by:
close in interface java.io.Closeable

release

public void release(E element)
Description copied from interface: Factory
Release, recycle or dispose of an object this factory created.

Specified by:
release in interface Factory<D,E>

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


Copyright © Peter Lawrey. All Rights Reserved.