public class LazyServiceProxy extends Object implements ServiceProxyInvocationHandler
Service proxy which allows to defer the actual load and creation of the service until the first invokation of one of
its contract methods. Lifecycle will also be applied lazily.
Use in tandem with the LazyServiceAssembly for a truly lazy effect.
| Modifier | Constructor and Description |
|---|---|
protected |
LazyServiceProxy(ServiceAssembly assembly,
DefaultServiceRegistry serviceRegistry,
Injector containerInjector) |
protected |
LazyServiceProxy(ServiceAssembly assembly,
DefaultServiceRegistry serviceRegistry,
org.mule.runtime.api.util.LazyValue<org.mule.runtime.api.service.Service> service) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.mule.runtime.api.service.Service |
forApplication(MethodInvoker methodInvoker)
Creates a new proxy
Service equivalent to this one, but to be used in the context of a deployed application. |
static org.mule.runtime.api.service.Service |
from(ServiceAssembly assembly,
ServiceRegistry serviceRegistry,
Injector containerInjector)
Creates a new proxy based on the given
assembly and serviceRegistry |
org.mule.runtime.api.service.Service |
getService() |
protected Object |
handleStart() |
protected Object |
handleStop() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
protected void |
setMethodInvoker(MethodInvoker methodInvoker) |
protected LazyServiceProxy(ServiceAssembly assembly, DefaultServiceRegistry serviceRegistry, Injector containerInjector)
protected LazyServiceProxy(ServiceAssembly assembly, DefaultServiceRegistry serviceRegistry, org.mule.runtime.api.util.LazyValue<org.mule.runtime.api.service.Service> service)
public static org.mule.runtime.api.service.Service from(ServiceAssembly assembly, ServiceRegistry serviceRegistry, Injector containerInjector)
assembly and serviceRegistryassembly - the ServiceAssemblyserviceRegistry - the DefaultServiceRegistryService proxypublic org.mule.runtime.api.service.Service forApplication(MethodInvoker methodInvoker)
Service equivalent to this one, but to be used in the context of a deployed application.methodInvoker - The MethodInvoker to usepublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke in interface InvocationHandlerThrowableprotected void setMethodInvoker(MethodInvoker methodInvoker)
protected Object handleStart()
protected Object handleStop()
public org.mule.runtime.api.service.Service getService()
getService in interface ServiceProxyInvocationHandlerCopyright © 2003–2023 MuleSoft, Inc.. All rights reserved.