|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.socket.sl.IOPoolLocator
@Immutable public final class IOPoolLocator
Locates an I/O pool service of a class with a name which is resolved by querying a system property or searching the class path, whatever yields a result first.
First, the value of the system property
with the class name "de.schlichtherle.truezip.socket.spi.IOPoolService"
as the key is queried.
If this yields a value, the class with that name is then loaded and
instantiated by calling its no-arg constructor.
Otherwise, the class path is searched for any resource file with the name
"META-INF/services/de.schlichtherle.truezip.socket.spi.IOPoolService".
If this yields a result, the class with the name in this file is then loaded
and instantiated by calling its no-arg constructor.
Otherwise, a ServiceConfigurationError is thrown.
| Field Summary | |
|---|---|
private IOPoolService |
service
|
static IOPoolLocator |
SINGLETON
The singleton instance of this class. |
| Constructor Summary | |
|---|---|
private |
IOPoolLocator()
You cannot instantiate this class. |
| Method Summary | |
|---|---|
IOPool<?> |
get()
Returns an I/O pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final IOPoolLocator SINGLETON
private final IOPoolService service
| Constructor Detail |
|---|
private IOPoolLocator()
| Method Detail |
|---|
public IOPool<?> get()
Calling this method several times may return different I/O pools, so callers might need to cache the result for subsequent use.
The implementation in the class IOPoolLocator delegates the
call to the container loaded by the constructor.
get in interface IOPoolProvider
|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||