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>

If a mapping of regions to endpoints exists, return a uri corresponding to the name of the region (passed argument). Otherwise, return the default location.

Author:
Adrian Cole

Constructor Summary
RegionToEndpointOrProviderIfNull(URI defaultUri, String defaultProvider, Map<String,URI> regionToEndpoint)
           
 
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(URI defaultUri,
                                               String defaultProvider,
                                               @Nullable
                                               Map<String,URI> regionToEndpoint)
Method Detail

apply

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


Copyright © 2009-2011 jclouds. All Rights Reserved.