public void registerWithEventBus() { if ( !registeredWithEventBus ) { eventBus.register( this ); registeredWithEventBus = true; } }
public void initialize() throws InitializationException { this.eventBus.register( this ); }
public void initialize() throws InitializationException { this.eventBus.register( this ); }
@Inject public RemoteControlLifecycle(final Provider<RemoteControl> service, final EventBus eventBus) { this.service = checkNotNull(service); eventBus.register(this); }
@Inject public DefaultLdapManager(final LdapAuthenticator ldapAuthenticator, final LdapUserDAO ldapUserManager, final LdapGroupDAO ldapGroupManager, final LdapConfiguration ldapConfiguration, final EventBus eventBus) { super(ldapAuthenticator, ldapUserManager, ldapGroupManager, ldapConfiguration); checkNotNull(eventBus).register(this); }
@Inject public P2MetadataEventsInspector(final Provider<P2RepositoryAggregator> p2RepositoryAggregator, final EventBus eventBus) { this.p2RepositoryAggregator = checkNotNull(p2RepositoryAggregator); checkNotNull(eventBus).register(this); }
@Inject public JarsEventsInspector(final Provider<P2MetadataGenerator> p2MetadataGenerator, final EventBus eventBus) { this.p2MetadataGenerator = checkNotNull(p2MetadataGenerator); checkNotNull(eventBus).register(this); }
@Inject public FilterChainInstaller(final EventBus eventBus, final Provider<ProtectedPathManager> protectedPathManager, final List<FilterChain> filterChains) { this.eventBus = checkNotNull(eventBus); this.protectedPathManager = checkNotNull(protectedPathManager); this.filterChains = checkNotNull(filterChains); eventBus.register(this); }
@Override public void addEventListener(final EventListener listener) { if (listener != null) { final Adapter adapter = new Adapter(listener); adapters.put(listener, adapter); eventBus.register(adapter); } }
/** * Default constructor. * * @param eventBus the {@link EventBus} to register with. */ @Inject public BCPluginEventHandler(final EventBus eventBus) { checkNotNull(eventBus); // register BC and nag if already installed registered = Security.addProvider(new BouncyCastleProvider()) != -1; if (registered) { log.debug("BouncyCastle security provider registered"); } else { log.warn("BouncyCastle security provider already registered; could become problematic"); } eventBus.register(this); }
/** * Adding this as config change listener. */ @Override protected void doConfigure() { // NEXUS-2883: turning off Range support for now getRangeService().setEnabled(false); // adding ourselves as listener eventBus.register(this); }
@Inject public DefaultSecuritySystem( List<SecurityEmailer> securityEmailers, EventBus eventBus, PasswordGenerator passwordGenerator, Map<String, AuthorizationManager> authorizationManagers, Map<String, Realm> realmMap, SecurityConfigurationManager securityConfiguration, Map<String, RealmSecurityManager> securityManagers, CacheManagerComponent cacheManagerComponent, UserManagerFacade userManagerFacade ) { this.securityEmailers = securityEmailers; this.eventBus = eventBus; this.passwordGenerator = passwordGenerator; this.authorizationManagers = authorizationManagers; this.realmMap = realmMap; this.securityConfiguration = securityConfiguration; this.securityManagers = securityManagers; this.cacheManagerComponent = cacheManagerComponent; this.eventBus.register( this ); this.userManagerFacade = userManagerFacade; SecurityUtils.setSecurityManager( this.getSecurityManager() ); }
eventBus.register(recorder);
/** * Constructor. * * @param applicationConfiguration the Nexus {@link ApplicationConfiguration}. * @param userAgentBuilder UA builder component. * @param eventBus the event multicaster * @param jmxInstaller installer to expose pool information over JMX. */ @Inject public Hc4ProviderImpl( final ApplicationConfiguration applicationConfiguration, final UserAgentBuilder userAgentBuilder, final EventBus eventBus, final PoolingClientConnectionManagerMBeanInstaller jmxInstaller ) { this.applicationConfiguration = Preconditions.checkNotNull( applicationConfiguration ); this.userAgentBuilder = Preconditions.checkNotNull( userAgentBuilder ); this.jmxInstaller = Preconditions.checkNotNull( jmxInstaller ); this.sharedConnectionManager = createClientConnectionManager(); this.evictingThread = new EvictingThread( sharedConnectionManager, getConnectionPoolIdleTime() ); this.evictingThread.start(); this.eventBus = Preconditions.checkNotNull( eventBus ); this.eventBus.register( this ); this.jmxInstaller.register( sharedConnectionManager ); getLogger().info( "{} started (connectionPoolMaxSize {}, connectionPoolSize {}, connectionPoolIdleTime {} ms, connectionPoolTimeout {} ms, keepAliveMaxDuration {} ms)", getClass().getSimpleName(), getConnectionPoolMaxSize(), getConnectionPoolSize(), getConnectionPoolIdleTime(), getConnectionPoolTimeout(), getKeepAliveMaxDuration() ); }