public abstract class AbstractFaxClientSpiProxy extends Object implements FaxClientSpiProxy
Name | Description | Preconfigured Value | Default Value | Mandatory |
org.fax4j.proxy.enabled | True to enable the fax client SPI proxy. | true | true | false |
org.fax4j.proxy.class.name | Defines the fax client SPI proxy class name. | org.fax4j.spi.FaxClientSpiProxyImpl | org.fax4j.spi.FaxClientSpiProxyImpl | false |
org.fax4j.proxy.interceptor.list | A list of interceptor types, separated by a ';' character. Each type must have a matching org.fax4j.proxy.interceptor.type.xxx property. |
log | none | false |
org.fax4j.proxy.interceptor.type.xxx | The interceptor type to class name mapping. | org.fax4j.proxy.interceptor.type.log=org.fax4j.spi.LogFaxClientSpiInterceptor | none | false |
FaxClientSpiProxy.FaxClientSpiProxyEventType
Constructor and Description |
---|
AbstractFaxClientSpiProxy()
This is the default constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getConfigurationValue(String key)
Returns the value from the SPI configuration based on the provided configuration key.
|
protected FaxClientSpi |
getFaxClientSpi()
This function returns the fax client SPI.
|
protected FaxClientSpiInterceptor[] |
getFaxClientSpiInterceptors()
This function returns the fax client SPI interceptors.
|
Logger |
getLogger()
Returns the internal logger.
|
void |
initialize(FaxClientSpi faxClientSpi,
FaxClientSpiInterceptor[] interceptors)
This function initializes the fax client SPI proxy.
This method is called by the FaxClientSpiFactory. |
protected abstract void |
initializeImpl()
This function initializes the fax client SPI proxy.
|
Object |
invoke(Object proxy,
Method method,
Object[] arguments)
This function is invoked for each fax client SPI method invocation.
This method invokes the fax client SPI interceptors. |
protected abstract void |
invokeInterceptors(FaxClientSpiProxy.FaxClientSpiProxyEventType eventType,
Method method,
Object[] arguments,
Object output,
Throwable throwable)
This function invokes the interceptor for the given event.
|
public AbstractFaxClientSpiProxy()
public final void initialize(FaxClientSpi faxClientSpi, FaxClientSpiInterceptor[] interceptors)
initialize
in interface FaxClientSpiProxy
faxClientSpi
- The fax client SPIinterceptors
- The fax client SPI interceptors (may be null)protected final FaxClientSpiInterceptor[] getFaxClientSpiInterceptors()
protected final FaxClientSpi getFaxClientSpi()
public final String getConfigurationValue(String key)
key
- The configuration keypublic final Logger getLogger()
public Object invoke(Object proxy, Method method, Object[] arguments) throws Throwable
invoke
in interface InvocationHandler
proxy
- The proxymethod
- The method invokedarguments
- The method argumentsThrowable
- Any throwableprotected abstract void initializeImpl()
protected abstract void invokeInterceptors(FaxClientSpiProxy.FaxClientSpiProxyEventType eventType, Method method, Object[] arguments, Object output, Throwable throwable)
eventType
- The event typemethod
- The method invokedarguments
- The method argumentsoutput
- The method outputthrowable
- The throwable while invoking the methodCopyright © 2009–2020 fax4j. All rights reserved.