|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.app.util.PeerFactory
public class PeerFactory
A mechanism for retrieving instances of singleton peer objects which are
defined to each support a specific Class
.
A properties file is used to associate peer classes with their supported
classes. The properties file should contain the fully qualified class
names of the supported objects as its keys. The values of the properties
file should contain the fully qualified class names of the peer objects.
A single instance of each peer class will be used to support ALL instances
of the supported class.
Constructor Summary | |
---|---|
PeerFactory(java.lang.String resourceName,
java.lang.ClassLoader classLoader)
Creates a new PeerFactory . |
Method Summary | |
---|---|
java.lang.Object |
getPeerForObject(java.lang.Class objectClass,
boolean searchSuperClasses)
Retrieves the appropriate peer instance for a given object Class . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PeerFactory(java.lang.String resourceName, java.lang.ClassLoader classLoader)
PeerFactory
.
resourceName
- the name of the resource properties file from which
the peer bindings may be retrieved (this file will be retrieved
using the PropertiesDiscovery
system, so multiple
instances of the file within the CLASSPATH
will be
automatically discovered.classLoader
- the ClassLoader
to use for retrieving the
resource file and for instantiating the peer singleton instancesMethod Detail |
---|
public java.lang.Object getPeerForObject(java.lang.Class objectClass, boolean searchSuperClasses)
Class
. Returns null in the event that no peer is provided
to support the specified class.
objectClass
- the supported object classsearchSuperClasses
- flag indicating whether superclasses
of objectClass
should be searched for peers if
none can be found for objectClass
itself
|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |