org.jclouds.compute.stub.config
Class StubComputeServiceDependenciesModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule
All Implemented Interfaces:
com.google.inject.Module

public class StubComputeServiceDependenciesModule
extends com.google.inject.AbstractModule

Author:
Adrian Cole

Nested Class Summary
static class StubComputeServiceDependenciesModule.StubSocketOpen
           
 
Field Summary
protected static com.google.common.cache.LoadingCache<String,ConcurrentMap<String,NodeMetadata>> backing
           
protected static com.google.common.cache.LoadingCache<String,AtomicInteger> nodeIds
           
 
Constructor Summary
StubComputeServiceDependenciesModule()
           
 
Method Summary
protected  void configure()
           
protected  Integer provideNodeIdForIdentity(String identity)
           
protected  ConcurrentMap<String,NodeMetadata> provideNodesForIdentity(String identity)
           
 
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backing

protected static final com.google.common.cache.LoadingCache<String,ConcurrentMap<String,NodeMetadata>> backing

nodeIds

protected static final com.google.common.cache.LoadingCache<String,AtomicInteger> nodeIds
Constructor Detail

StubComputeServiceDependenciesModule

public StubComputeServiceDependenciesModule()
Method Detail

configure

protected void configure()
Specified by:
configure in class com.google.inject.AbstractModule

provideNodesForIdentity

@Provides
@Singleton
protected ConcurrentMap<String,NodeMetadata> provideNodesForIdentity(String identity)
                                                              throws ExecutionException
Throws:
ExecutionException

provideNodeIdForIdentity

@Provides
@Named(value="NODE_ID")
protected Integer provideNodeIdForIdentity(String identity)
                                    throws ExecutionException
Throws:
ExecutionException


Copyright © 2009-2012 jclouds. All Rights Reserved.