Created
July 25, 2010 12:07
-
-
Save pmuir/489519 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
@GenericConfiguration | |
@Retention(RUNTIME) | |
@Target( { TYPE, METHOD, PARAMETER, FIELD }) | |
public @interface Service {} | |
@Produces | |
@Service @S3 | |
public BlobStoreContext getS3BlobStoreContext(BlobStoreContextFactory factory) { | |
return factory.openContext(...); | |
} | |
@Generic(Service.class) | |
public class BlobStoreContextManager { | |
@ApplyQualifiers @Produces | |
public BlobStore getBlobStore(@ApplyQualifiers BlobStoreContext context) { | |
return context.getBlobStore(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment