org.codehaus.wadi.servicespace.basic
Class BasicServiceSpace

java.lang.Object
  extended by org.codehaus.wadi.servicespace.basic.BasicServiceSpace
All Implemented Interfaces:
Lifecycle, ServiceSpace
Direct Known Subclasses:
AdminServiceSpace

public class BasicServiceSpace
extends java.lang.Object
implements ServiceSpace, Lifecycle

Version:
$Revision: $

Nested Class Summary
protected  class BasicServiceSpace.ServiceSpaceLifecycleEndpoint
           
 class BasicServiceSpace.UnderlyingClusterListener
           
 
Field Summary
protected  Dispatcher dispatcher
           
protected  Dispatcher underlyingDispatcher
           
 
Constructor Summary
BasicServiceSpace(ServiceSpaceName name, Dispatcher underlyingDispatcher, ClassIndexerRegistry serviceClassIndexerRegistry, Streamer streamer)
           
 
Method Summary
 void addServiceSpaceListener(ServiceSpaceListener listener)
           
 boolean equals(java.lang.Object obj)
           
 Dispatcher getDispatcher()
           
 java.util.Set<Peer> getHostingPeers()
           
 LocalPeer getLocalPeer()
           
 ServiceMonitor getServiceMonitor(ServiceName serviceName)
           
 ServiceProxyFactory getServiceProxyFactory(ServiceName serviceName, java.lang.Class[] interfaces)
           
 ServiceRegistry getServiceRegistry()
           
 ServiceSpaceName getServiceSpaceName()
           
protected  ServiceSpaceRegistry getServiceSpaceRegistry()
           
 Dispatcher getUnderlyingDispatcher()
           
 int hashCode()
           
protected  Dispatcher newDispatcher()
           
protected  ServiceMonitor newServiceMonitor(ServiceName serviceName)
           
protected  StartableServiceRegistry newServiceRegistry()
           
protected  BasicServiceSpaceEnvelopeHelper newServiceSpaceEnvelopeHelper(Streamer streamer)
           
protected  ServiceSpaceRegistryFactory newServiceSpaceRegistryFactory()
           
protected  void notifyListeners(ServiceSpaceLifecycleEvent event, java.util.Set<Peer> newHostingPeers)
           
protected  void processLifecycleEvent(ServiceSpaceLifecycleEvent event)
           
protected  void registerEndPoints()
           
protected  void registerServiceSpace()
           
 void removeServiceSpaceListener(ServiceSpaceListener listener)
           
protected  void sendLifecycleEventToCluster(LifecycleState state)
           
 void start()
           
 void stop()
           
 java.lang.String toString()
           
protected  void unregisterEndPoints()
           
protected  void unregisterServiceSpace()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

underlyingDispatcher

protected final Dispatcher underlyingDispatcher

dispatcher

protected final Dispatcher dispatcher
Constructor Detail

BasicServiceSpace

public BasicServiceSpace(ServiceSpaceName name,
                         Dispatcher underlyingDispatcher,
                         ClassIndexerRegistry serviceClassIndexerRegistry,
                         Streamer streamer)
Method Detail

getLocalPeer

public LocalPeer getLocalPeer()
Specified by:
getLocalPeer in interface ServiceSpace

addServiceSpaceListener

public void addServiceSpaceListener(ServiceSpaceListener listener)
Specified by:
addServiceSpaceListener in interface ServiceSpace

getDispatcher

public Dispatcher getDispatcher()
Specified by:
getDispatcher in interface ServiceSpace

getServiceSpaceName

public ServiceSpaceName getServiceSpaceName()
Specified by:
getServiceSpaceName in interface ServiceSpace

getHostingPeers

public java.util.Set<Peer> getHostingPeers()
Specified by:
getHostingPeers in interface ServiceSpace

getServiceMonitor

public ServiceMonitor getServiceMonitor(ServiceName serviceName)
Specified by:
getServiceMonitor in interface ServiceSpace

getServiceRegistry

public ServiceRegistry getServiceRegistry()
Specified by:
getServiceRegistry in interface ServiceSpace

removeServiceSpaceListener

public void removeServiceSpaceListener(ServiceSpaceListener listener)
Specified by:
removeServiceSpaceListener in interface ServiceSpace

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface Lifecycle
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface Lifecycle
Throws:
java.lang.Exception

getServiceProxyFactory

public ServiceProxyFactory getServiceProxyFactory(ServiceName serviceName,
                                                  java.lang.Class[] interfaces)
Specified by:
getServiceProxyFactory in interface ServiceSpace

getUnderlyingDispatcher

public Dispatcher getUnderlyingDispatcher()

registerServiceSpace

protected void registerServiceSpace()

unregisterServiceSpace

protected void unregisterServiceSpace()

getServiceSpaceRegistry

protected ServiceSpaceRegistry getServiceSpaceRegistry()

newServiceSpaceRegistryFactory

protected ServiceSpaceRegistryFactory newServiceSpaceRegistryFactory()

newServiceRegistry

protected StartableServiceRegistry newServiceRegistry()

newServiceSpaceEnvelopeHelper

protected BasicServiceSpaceEnvelopeHelper newServiceSpaceEnvelopeHelper(Streamer streamer)

newDispatcher

protected Dispatcher newDispatcher()

newServiceMonitor

protected ServiceMonitor newServiceMonitor(ServiceName serviceName)

registerEndPoints

protected void registerEndPoints()

unregisterEndPoints

protected void unregisterEndPoints()

sendLifecycleEventToCluster

protected void sendLifecycleEventToCluster(LifecycleState state)

notifyListeners

protected void notifyListeners(ServiceSpaceLifecycleEvent event,
                               java.util.Set<Peer> newHostingPeers)

processLifecycleEvent

protected void processLifecycleEvent(ServiceSpaceLifecycleEvent event)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011. All Rights Reserved.