|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dsrg.sofa.osgi.ServiceProxy
public class ServiceProxy
Service Proxy
It handles method invocations on a SOFA2 interface and acts as a mediator between the interface and a service. Furthermore, it deals with method types (i.e. method parameters, return value, exceptions) when handling a method invocation.
Constructor Summary | |
---|---|
ServiceProxy(java.lang.String version,
boolean reverse)
Service Proxy constructor |
Method Summary | |
---|---|
java.lang.Object |
getService()
Get the service implementation |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method m,
java.lang.Object[] args)
Handles a method invocation |
void |
setFallback(java.lang.Object content)
Sets the fallback service implementation |
void |
setService(java.lang.Object service)
Set the service implementation |
void |
setTimeout(long timeout)
Sets the timeout value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceProxy(java.lang.String version, boolean reverse)
version
- the interface type versionreverse
- the proxy directionMethod Detail |
---|
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
proxy
- the proxy instance that the method was invoked onm
- the method being invokedargs
- the method parameters
java.lang.Throwable
public java.lang.Object getService()
public void setService(java.lang.Object service)
service
- the service implementationpublic void setTimeout(long timeout)
timeout
- time in milisecondspublic void setFallback(java.lang.Object content)
content
- the fallback service implementation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |