public final class CompositeClientAdapter extends Object implements ClientAdapter
Downstream adapters are registered by constructing a new CompositeClientAdapter.Builder
, or method newBuilder()
Downstream adapters can also be customized by decorators provided by ClientAdapterCustomizer
, which
allows separating name matching from proxy construction in adapters' implementations.
ClientAdapterCustomizer
Modifier and Type | Class and Description |
---|---|
static class |
CompositeClientAdapter.Builder
Builder for composite Client Adapter.
|
Modifier and Type | Method and Description |
---|---|
Optional<Object> |
makeLocalProxy(String jndiName,
Context remoteContext)
Find a client adapter for handling specific
jndiName . |
static CompositeClientAdapter.Builder |
newBuilder()
Convenience method for constructing a
CompositeClientAdapter.Builder |
public Optional<Object> makeLocalProxy(String jndiName, Context remoteContext) throws NamingException
jndiName
. Composite client adapter will attempt invoking
ClientAdapter.makeLocalProxy(String, Context)
for all registered adapters in order they were
registered in. The iteration ends when
NamingException
makeLocalProxy
in interface ClientAdapter
jndiName
- JNDI name that is being looked upremoteContext
- EJB HTTP Client naming context for delegating the callsOptional.empty()
otherwiseNamingException
- if any of attempted client adapters throws onepublic static CompositeClientAdapter.Builder newBuilder()
CompositeClientAdapter.Builder
Copyright © 2019. All rights reserved.