org.jclouds.location.functions
Class RegionToEndpointOrProviderIfNull

java.lang.Object
  extended by org.jclouds.location.functions.RegionToEndpointOrProviderIfNull
All Implemented Interfaces:
com.google.common.base.Function<Object,URI>

@Singleton
public class RegionToEndpointOrProviderIfNull
extends Object
implements com.google.common.base.Function<Object,URI>

Return a uri corresponding to the name of the region (passed argument). Otherwise, return the default location.

Author:
Adrian Cole

Constructor Summary
RegionToEndpointOrProviderIfNull(String defaultProvider, com.google.common.base.Supplier<URI> defaultUri, com.google.common.base.Supplier<Map<String,com.google.common.base.Supplier<URI>>> regionToEndpointSupplier)
           
 
Method Summary
 URI apply(Object from)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Constructor Detail

RegionToEndpointOrProviderIfNull

@Inject
public RegionToEndpointOrProviderIfNull(String defaultProvider,
                                               com.google.common.base.Supplier<URI> defaultUri,
                                               com.google.common.base.Supplier<Map<String,com.google.common.base.Supplier<URI>>> regionToEndpointSupplier)
Method Detail

apply

public URI apply(@Nullable
                 Object from)
Specified by:
apply in interface com.google.common.base.Function<Object,URI>


Copyright © 2009-2012 jclouds. All Rights Reserved.