List of usage examples for org.springframework.context.annotation ScopedProxyMode INTERFACES
ScopedProxyMode INTERFACES
To view the source code for org.springframework.context.annotation ScopedProxyMode INTERFACES.
Click Source Link
From source file:p2v.config.SocialConfig.java
@Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionFactoryLocator connectionFactoryLocator() { ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry(); // registry.addConnectionFactory(new TwitterConnectionFactory(environment.getProperty("twitter.consumerKey"), // environment.getProperty("twitter.consumerSecret"))); registry.addConnectionFactory(new FacebookConnectionFactory(environment.getProperty("facebook.clientId"), environment.getProperty("facebook.clientSecret"))); return registry; }
From source file:at.ac.univie.isc.asio.brood.BroodComponents.java
@Bean @Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.INTERFACES) public DatasetHolder activeDataset() { return new DatasetHolder(); }
From source file:org.vaadin.spring.events.config.EventBusConfiguration.java
@Bean @Scope(value = ViewScopeImpl.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.INTERFACES) @EventBusProxy EventBus.ViewEventBus proxiedViewEventBus() { return viewEventBus(); }
From source file:org.vaadin.spring.events.config.VaadinEventbusConfiguration.java
@Bean @Scope(value = VaadinViewScope.VAADIN_VIEW_SCOPE_NAME, proxyMode = ScopedProxyMode.INTERFACES) @EventBusProxy EventBus.ViewEventBus proxiedViewEventBus() { return viewEventBus(); }
From source file:org.fuzzydb.samples.mvc.config.SocialConfig.java
@Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionFactoryLocator connectionFactoryLocator() { ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry(); registry.addConnectionFactory(new TwitterConnectionFactory(environment.getProperty("twitter.consumerKey"), environment.getProperty("twitter.consumerSecret"))); registry.addConnectionFactory(new FacebookConnectionFactory(environment.getProperty("facebook.clientId"), environment.getProperty("facebook.clientSecret"))); return registry; }
From source file:com.notemyweb.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionRepository connectionRepository() { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication == null) { throw new IllegalStateException("Unable to get a ConnectionRepository: no user signed in"); }/*from www.java2 s .c o m*/ return usersConnectionRepository.createConnectionRepository(authentication.getName()); }
From source file:com.solxiom.social.config.ExplicitSocialConfig.java
@Bean @Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionFactoryLocator connectionFactoryLocator() { ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry(); registry.addConnectionFactory(new FacebookConnectionFactory(environment.getProperty("facebook.clientId"), environment.getProperty("facebook.clientSecret"), environment.getProperty("facebook.appNamespace"))); return registry; }
From source file:org.vaadin.spring.config.VaadinExtensionsConfiguration.java
/** * Vaadin Http Service//from ww w . j av a 2s. c om * Allow access to HttpRequest / HttpResponse */ @Bean @Scope(value = org.springframework.web.context.WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.INTERFACES) HttpService httpService() { return new VaadinHttpService(); }
From source file:org.vaadin.spring.config.VaadinConfiguration.java
@Bean @Scope(value = VaadinSessionScope.VAADIN_SESSION_SCOPE_NAME, proxyMode = ScopedProxyMode.INTERFACES) @EventBusScope(value = EventScope.SESSION, proxy = true) EventBus proxiedSessionEventBus() { return sessionEventBus(); }
From source file:com.jiwhiz.web.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Google google(ConnectionRepository repository) { Connection<Google> connection = repository.findPrimaryConnection(Google.class); return connection != null ? connection.getApi() : new GoogleTemplate(); }