public class LazyServiceProxy extends Object implements InvocationHandler
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,
ServiceRegistry serviceRegistry) |
protected |
LazyServiceProxy(ServiceAssembly assembly,
ServiceRegistry 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)
Creates a new proxy based on the given
assembly and serviceRegistry |
protected Object |
handleStart() |
protected Object |
handleStop() |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
protected void |
setMethodInvoker(MethodInvoker methodInvoker) |
protected LazyServiceProxy(ServiceAssembly assembly, ServiceRegistry serviceRegistry)
protected LazyServiceProxy(ServiceAssembly assembly, ServiceRegistry 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)
assembly and serviceRegistryassembly - the ServiceAssemblyserviceRegistry - the ServiceRegistryService 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()
Copyright © 2003–2024 MuleSoft, Inc.. All rights reserved.