Created
January 4, 2016 16:24
-
-
Save jonathanvila/949600975d82915f05f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Reference(referenceInterface = AspectRatioCalculator.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC) | |
private final Map<String, AspectRatioCalculator> aspectRatioCalculators = new ConcurrentHashMap<String, AspectRatioCalculator>(); | |
protected void bindAspectRatioCalculators(final AspectRatioCalculator arc) { | |
LOG.debug("Registering [{}] as aspect ratio calculator for resource type [{}]", arc.getClass().getName(), arc.getResourceType()); | |
this.aspectRatioCalculators.put(arc.getResourceType(), arc); | |
} | |
protected void unbindAspectRatioCalculators(final AspectRatioCalculator arc) { | |
LOG.debug("Unregistering [{}] as aspect ratio calculator for resource type [{}]", arc.getClass().getName(), arc.getResourceType()); | |
this.aspectRatioCalculators.remove(arc.getResourceType()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment