public class ServiceModule extends Object implements com.google.inject.Module
Constructor and Description |
---|
ServiceModule() |
ServiceModule(Config config) |
public ServiceModule()
public ServiceModule(Config config)
public static ServiceModuleExtender extend(com.google.inject.Binder binder)
Module.configure(Binder)
method.binder
- DI binder passed to the Module that invokes this method.@Deprecated public static com.google.inject.multibindings.Multibinder<PeerSourceFactory> contributePeerSourceFactory(com.google.inject.Binder binder)
ServiceModuleExtender.addPeerSourceFactory(Class)
and its' overloaded versions@Deprecated public static com.google.inject.multibindings.Multibinder<Object> contributeMessagingAgent(com.google.inject.Binder binder)
ServiceModuleExtender.addMessagingAgentType(Class)
and ServiceModuleExtender.addMessagingAgent(Object)
@Deprecated public static com.google.inject.multibindings.MapBinder<String,TrackerFactory> contributeTrackerFactory(com.google.inject.Binder binder)
ServiceModuleExtender.addTrackerFactory(Class, String, String...)
and its' overloaded versionspublic void configure(com.google.inject.Binder binder)
configure
in interface com.google.inject.Module
@Provides public ChunkVerifier provideVerifier(Config config, Digester digester)
@Provides public IDataDescriptorFactory provideDataDescriptorFactory(Config config, EventSource eventSource, ChunkVerifier verifier)
@Provides public DataWorker provideDataWorker(IRuntimeLifecycleBinder lifecycleBinder, TorrentRegistry torrentRegistry, ChunkVerifier verifier, BlockCache blockCache, Config config)
@Provides public EventBus provideEventBus()
@Provides public SharedSelector provideSelector(IRuntimeLifecycleBinder lifecycleBinder)
@Provides public IPeerConnectionFactory providePeerConnectionFactory(SharedSelector selector, IConnectionHandlerFactory connectionHandlerFactory, MessageHandler<Message> bittorrentProtocol, TorrentRegistry torrentRegistry, IChannelPipelineFactory channelPipelineFactory, IBufferManager bufferManager, DataReceiver dataReceiver, EventSource eventSource, Config config)
@Provides public SocketChannelConnectionAcceptor provideSocketChannelConnectionAcceptor(SharedSelector selector, IPeerConnectionFactory connectionFactory, Config config)
Copyright © 2016–2021. All rights reserved.