org.granite.client.tide.impl
Class ComponentImpl
java.lang.Object
org.granite.client.tide.impl.ComponentImpl
- All Implemented Interfaces:
- InvocationHandler, ContextAware, NameAware, Component
- Direct Known Subclasses:
- BaseIdentity
public class ComponentImpl
- extends Object
- implements Component, ContextAware, NameAware, InvocationHandler
- Author:
- William DRAI
|
Method Summary |
|
call(String operation,
Object... args)
|
protected
|
callComponent(Context context,
String operation,
Object[] args,
boolean withContext)
Calls a remote component |
protected Context |
getContext()
|
String |
getName()
|
protected ServerSession |
getServerSession()
|
|
invoke(Context context,
Component component,
String operation,
Object[] args,
TideResponder<T> tideResponder,
boolean withContext,
ComponentListener.Handler<T> handler)
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
void |
setContext(Context context)
|
void |
setName(String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentImpl
public ComponentImpl()
ComponentImpl
public ComponentImpl(ServerSession serverSession)
setName
public void setName(String name)
- Specified by:
setName in interface NameAware
getName
public String getName()
- Specified by:
getName in interface Component
setContext
public void setContext(Context context)
- Specified by:
setContext in interface ContextAware
getContext
protected Context getContext()
getServerSession
protected ServerSession getServerSession()
call
public <T> Future<T> call(String operation,
Object... args)
- Specified by:
call in interface Component
invoke
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
- Specified by:
invoke in interface InvocationHandler
- Throws:
Throwable
callComponent
protected <T> Future<T> callComponent(Context context,
String operation,
Object[] args,
boolean withContext)
- Calls a remote component
- Parameters:
component - the target componentop - name of the called methoarg - method parameterswithContext - add context sync data to call
- Returns:
- the operation token
invoke
public <T> Future<T> invoke(Context context,
Component component,
String operation,
Object[] args,
TideResponder<T> tideResponder,
boolean withContext,
ComponentListener.Handler<T> handler)