org.fusesource.fabric.dosgi.tcp
Class ClientInvokerImpl
java.lang.Object
org.fusesource.fabric.dosgi.tcp.ClientInvokerImpl
- All Implemented Interfaces:
- Dispatched, ClientInvoker, Service
public class ClientInvokerImpl
- extends java.lang.Object
- implements ClientInvoker, Dispatched
|
Method Summary |
java.lang.reflect.InvocationHandler |
getProxy(java.lang.String address,
java.lang.String service,
java.lang.ClassLoader classLoader)
|
protected void |
onCommand(java.lang.Object data)
|
org.fusesource.hawtdispatch.DispatchQueue |
queue()
|
protected java.lang.Object |
request(ClientInvokerImpl.ProxyInvocationHandler handler,
java.lang.String address,
org.fusesource.hawtbuf.UTF8Buffer service,
java.lang.ClassLoader classLoader,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
void |
start()
Starts the service. |
void |
start(java.lang.Runnable onComplete)
Starts the service. |
void |
stop()
Stops the service. |
void |
stop(java.lang.Runnable onComplete)
Stops the service. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUT
LOGGER
protected static final org.slf4j.Logger LOGGER
correlationGenerator
protected final java.util.concurrent.atomic.AtomicLong correlationGenerator
queue
protected final org.fusesource.hawtdispatch.DispatchQueue queue
transports
protected final java.util.Map<java.lang.String,TransportPool> transports
running
protected final java.util.concurrent.atomic.AtomicBoolean running
requests
protected final java.util.Map<java.lang.Long,ResponseFuture> requests
timeout
protected final long timeout
serializationStrategies
protected final java.util.Map<java.lang.String,SerializationStrategy> serializationStrategies
ClientInvokerImpl
public ClientInvokerImpl(org.fusesource.hawtdispatch.DispatchQueue queue,
java.util.Map<java.lang.String,SerializationStrategy> serializationStrategies)
ClientInvokerImpl
public ClientInvokerImpl(org.fusesource.hawtdispatch.DispatchQueue queue,
long timeout,
java.util.Map<java.lang.String,SerializationStrategy> serializationStrategies)
queue
public org.fusesource.hawtdispatch.DispatchQueue queue()
- Specified by:
queue in interface Dispatched
start
public void start()
throws java.lang.Exception
- Description copied from interface:
Service
- Starts the service. No guarantee is given that the service has fully started
by the time this method returns.
- Specified by:
start in interface Service
- Throws:
java.lang.Exception
start
public void start(java.lang.Runnable onComplete)
throws java.lang.Exception
- Description copied from interface:
Service
- Starts the service. Executes the onComplete runnable once the service has fully started up.
- Specified by:
start in interface Service
- Parameters:
onComplete - my be set to null if not interested in a callback.
- Throws:
java.lang.Exception
stop
public void stop()
- Description copied from interface:
Service
- Stops the service. No guarantee is given that the service has fully stopped
by the time this method returns.
- Specified by:
stop in interface Service
stop
public void stop(java.lang.Runnable onComplete)
- Description copied from interface:
Service
- Stops the service. Executes the onComplete runnable once the service has fully stopped.
- Specified by:
stop in interface Service
- Parameters:
onComplete - my be set to null if not interested in a callback.
getProxy
public java.lang.reflect.InvocationHandler getProxy(java.lang.String address,
java.lang.String service,
java.lang.ClassLoader classLoader)
- Specified by:
getProxy in interface ClientInvoker
onCommand
protected void onCommand(java.lang.Object data)
request
protected java.lang.Object request(ClientInvokerImpl.ProxyInvocationHandler handler,
java.lang.String address,
org.fusesource.hawtbuf.UTF8Buffer service,
java.lang.ClassLoader classLoader,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2012 FuseSource. All Rights Reserved.