T
- public class SerializableProxyFactory<T> extends Object
Serializable proxy factory that allows to create serializable proxies to objects that are themselves not serializable.
This class does not do any cleanup so it is recommended to only use this in test utilities.
Constructor and Description |
---|
SerializableProxyFactory(Class<T> aClass,
T aSvc)
Constructs the factory with a callback to create thread-specific objects
automatically.
|
Modifier and Type | Method and Description |
---|---|
T |
get()
Gets the underlying service.
|
T |
getProxy()
Gets the serializable proxy that delegates to the object passed in the constructor.
|
public SerializableProxyFactory(Class<T> aClass, T aSvc)
aClass
- Interface class of the service to proxy.aCallback
- Callback to create the object if it does not exist. When null,
then no initialization is done.Copyright © 2022. All rights reserved.