public class JAXBObjectifier<T> extends Object implements IOObjectifier<T>
| Constructor and Description |
|---|
JAXBObjectifier(Class<?>... classes) |
JAXBObjectifier(Schema schema,
Class<?>... classes) |
| Modifier and Type | Method and Description |
|---|---|
T |
newInstance()
Create a new object of type T.
|
T |
objectify(Env env,
InputStream is)
Marshal to Object T from an InputStream, using contents from Env as necessary.
|
T |
objectify(Env env,
Reader rdr)
Marshal to Object T from a Reader, using contents from Env as necessary.
|
T |
objectify(Env env,
String input)
Marshal to Object T from a String, using contents from Env as necessary.
|
void |
refresh(Env env)
The Service will call this when (service-defined) configurations change.
|
void |
serviceDestroy(Env env)
Parallel to servicePrestart, serviceDestroy tells the implementor that
the service is ending, and to take this opportunity to close out any
content under it's control that can or should be closed explicitly.
|
void |
servicePrestart(Env env)
The Service using LifeCycle Elements is required to call this method at
the appropriate startup time.
|
void |
threadDestroy(Env env)
Parallel to threadPrestart, threadDestroy tells the implementor that the
service is ending this particular thread, and to take this opportunity to
close out any content specific to this thread that can be closed.
|
void |
threadPrestart(Env env)
Many cases of implementations are not thread safe, and mechanisms must be
derived to accomodate them by holding per Thread.
|
public JAXBObjectifier(Schema schema, Class<?>... classes) throws APIException
APIExceptionpublic JAXBObjectifier(Class<?>... classes) throws APIException
APIExceptionpublic T objectify(Env env, String input) throws APIException
Objectifier
Implementations should use the Env to call "env.startXMLTime()" to mark
XML time, since this is often a costly process.
objectify in interface Objectifier<T>APIExceptionpublic T objectify(Env env, Reader rdr) throws APIException
IOObjectifier
Implementations should use the Env to call "env.startXMLTime()" to mark
XML time, since this is often a costly process.
objectify in interface IOObjectifier<T>APIExceptionpublic T objectify(Env env, InputStream is) throws APIException
IOObjectifier
Implementations should use the Env to call "env.startXMLTime()" to mark
XML time, since this is often a costly process.
objectify in interface IOObjectifier<T>APIExceptionpublic void servicePrestart(Env env) throws APIException
LifeCycle
An excellent use is to establish security credentials with a backend
after appropriate configurations have been read and available as part of
the Env Object.
servicePrestart in interface LifeCycleAPIExceptionpublic void threadPrestart(Env env) throws APIException
LifeCycle
ThreadLocal is a valuable resource, but start up times within the
thread, depending on what it is, can be substantial.
Use ThreadPrestart to do all that is possible before actually performing work, i.e. inside of a client transaction.
threadPrestart in interface LifeCycleAPIExceptionpublic void refresh(Env env) throws APIException
LifeCycleThis mechanism allows the Service to recognize events, such as file changes, and pass on the event to all LifeCycle implementors.
The code should take the opportunity to evaluate configuration and change as necessary.
RefreshableThreadObject, because it implements LifeCycle, and
responds to the refresh command.refresh in interface LifeCycleAPIExceptionpublic void threadDestroy(Env env) throws APIException
LifeCyclethreadDestroy in interface LifeCycleAPIExceptionpublic void serviceDestroy(Env env) throws APIException
LifeCycleserviceDestroy in interface LifeCycleAPIExceptionpublic T newInstance() throws APIException
ObjectifiernewInstance in interface Objectifier<T>APIExceptionCopyright © 2017. All rights reserved.