org.jclouds.openstack.nova.v2_0.compute.functions
Class SecurityGroupRuleToIpPermission

java.lang.Object
  extended by org.jclouds.openstack.nova.v2_0.compute.functions.SecurityGroupRuleToIpPermission
All Implemented Interfaces:
com.google.common.base.Function<SecurityGroupRule,org.jclouds.net.domain.IpPermission>

public class SecurityGroupRuleToIpPermission
extends Object
implements com.google.common.base.Function<SecurityGroupRule,org.jclouds.net.domain.IpPermission>

A function for transforming a nova-specific SecurityGroupRule into a generic IpPermission object.


Field Summary
protected  com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex
           
protected  org.jclouds.logging.Logger logger
           
protected  com.google.common.base.Predicate<AtomicReference<ZoneAndName>> returnSecurityGroupExistsInZone
           
 
Constructor Summary
SecurityGroupRuleToIpPermission(com.google.common.base.Predicate<AtomicReference<ZoneAndName>> returnSecurityGroupExistsInZone, com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex, com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroupInZone> groupMap)
           
 
Method Summary
 org.jclouds.net.domain.IpPermission apply(SecurityGroupRule rule)
           
protected  com.google.common.base.Predicate<String> isSecurityGroupInZone(String groupName)
           
 
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
 

Field Detail

logger

@Named(value="jclouds.compute")
protected org.jclouds.logging.Logger logger

returnSecurityGroupExistsInZone

protected final com.google.common.base.Predicate<AtomicReference<ZoneAndName>> returnSecurityGroupExistsInZone

locationIndex

protected final com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex
Constructor Detail

SecurityGroupRuleToIpPermission

@Inject
public SecurityGroupRuleToIpPermission(@Named(value="SECURITYGROUP_PRESENT")
                                              com.google.common.base.Predicate<AtomicReference<ZoneAndName>> returnSecurityGroupExistsInZone,
                                              com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex,
                                              com.google.common.cache.LoadingCache<ZoneAndName,SecurityGroupInZone> groupMap)
Method Detail

apply

public org.jclouds.net.domain.IpPermission apply(SecurityGroupRule rule)
Specified by:
apply in interface com.google.common.base.Function<SecurityGroupRule,org.jclouds.net.domain.IpPermission>

isSecurityGroupInZone

protected com.google.common.base.Predicate<String> isSecurityGroupInZone(String groupName)


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.