org.fusesource.fabric.dosgi.tcp
Class ServerInvokerImpl

java.lang.Object
  extended by org.fusesource.fabric.dosgi.tcp.ServerInvokerImpl
All Implemented Interfaces:
Dispatched, ServerInvoker, Service

public class ServerInvokerImpl
extends java.lang.Object
implements ServerInvoker, Dispatched


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.fusesource.fabric.dosgi.io.ServerInvoker
ServerInvoker.ServiceFactory
 
Field Summary
protected  java.util.concurrent.ExecutorService blockingExecutor
           
protected  java.util.Map<org.fusesource.hawtbuf.UTF8Buffer,org.fusesource.fabric.dosgi.tcp.ServerInvokerImpl.ServiceFactoryHolder> holders
           
protected static org.slf4j.Logger LOGGER
           
protected  org.fusesource.hawtdispatch.DispatchQueue queue
           
protected  TransportServer server
           
 
Constructor Summary
ServerInvokerImpl(java.lang.String address, org.fusesource.hawtdispatch.DispatchQueue queue, java.util.Map<java.lang.String,SerializationStrategy> serializationStrategies)
           
 
Method Summary
 java.lang.String getConnectAddress()
           
 java.net.InetSocketAddress getSocketAddress()
           
protected  void onCommand(Transport transport, java.lang.Object data)
           
 org.fusesource.hawtdispatch.DispatchQueue queue()
           
 void registerService(java.lang.String id, ServerInvoker.ServiceFactory service, java.lang.ClassLoader classLoader)
           
 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.
 void unregisterService(java.lang.String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER

blockingExecutor

protected final java.util.concurrent.ExecutorService blockingExecutor

queue

protected final org.fusesource.hawtdispatch.DispatchQueue queue

server

protected final TransportServer server

holders

protected final java.util.Map<org.fusesource.hawtbuf.UTF8Buffer,org.fusesource.fabric.dosgi.tcp.ServerInvokerImpl.ServiceFactoryHolder> holders
Constructor Detail

ServerInvokerImpl

public ServerInvokerImpl(java.lang.String address,
                         org.fusesource.hawtdispatch.DispatchQueue queue,
                         java.util.Map<java.lang.String,SerializationStrategy> serializationStrategies)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getSocketAddress

public java.net.InetSocketAddress getSocketAddress()

queue

public org.fusesource.hawtdispatch.DispatchQueue queue()
Specified by:
queue in interface Dispatched

getConnectAddress

public java.lang.String getConnectAddress()
Specified by:
getConnectAddress in interface ServerInvoker

registerService

public void registerService(java.lang.String id,
                            ServerInvoker.ServiceFactory service,
                            java.lang.ClassLoader classLoader)
Specified by:
registerService in interface ServerInvoker

unregisterService

public void unregisterService(java.lang.String id)
Specified by:
unregisterService in interface ServerInvoker

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.

onCommand

protected void onCommand(Transport transport,
                         java.lang.Object data)


Copyright © 2013 Red Hat. All Rights Reserved.