public class UnavailableFactoryException extends MissingFactoryResourceException
EPSGFactory
has no connection to an EPSG database.
MissingFactoryResourceException
means that at least one particular object
can not be created, but other objects may be okay.ConcurrentAuthorityFactory.newDataAccess()
,
Serialized FormDefined in the sis-referencing
module
Constructor and Description |
---|
UnavailableFactoryException()
Construct an exception with no detail message.
|
UnavailableFactoryException(String message)
Construct an exception with the specified detail message.
|
UnavailableFactoryException(String message,
Throwable cause)
Construct an exception with the specified detail message and cause.
|
Modifier and Type | Method and Description |
---|---|
AuthorityFactory |
getUnavailableFactory()
Returns the factory which has been found unavailable, or
null if unspecified. |
void |
setUnavailableFactory(AuthorityFactory factory)
Specifies which factory is unavailable.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public UnavailableFactoryException()
public UnavailableFactoryException(String message)
message
- the detail message. The detail message is saved
for later retrieval by the Throwable.getMessage()
method.public UnavailableFactoryException(String message, Throwable cause)
IOException
or SQLException
).message
- the detail message. The detail message is saved
for later retrieval by the Throwable.getMessage()
method.cause
- the cause for this exception. The cause is saved
for later retrieval by the Throwable.getCause()
method.public void setUnavailableFactory(AuthorityFactory factory)
EPSGFactory
may have been successfully created with
a valid DataSource
. But the call to DataSource.getConnection()
happens only later (the first time that user invokes a method requiring a search in the database).
In case of failure to connect to the database, user may discover late that the factory is actually
unavailable. User may want to be informed about which factory is unavailable, for example in order
to remove it from the list of factory managed by MultiAuthoritiesFactory
.factory
- the factory which is unavailable.public AuthorityFactory getUnavailableFactory()
null
if unspecified.
See setUnavailableFactory(AuthorityFactory)
for more details.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.