Package org.jgrapes.mail
Class MailConnectionManager<O extends OpenMailConnection,C extends MailConnectionManager<O,C>.AbstractMailChannel>
java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jgrapes.mail.MailComponent
org.jgrapes.mail.MailConnectionManager<O,C>
- Type Parameters:
O
- the type of the open eventC
- the type of the channel
- All Implemented Interfaces:
Iterable<ComponentType>
,Channel
,ComponentType
,Eligible
,Manager
- Direct Known Subclasses:
MailStoreMonitor
public abstract class MailConnectionManager<O extends OpenMailConnection,C extends MailConnectionManager<O,C>.AbstractMailChannel>
extends MailComponent
Provides a base class for mail components using connections.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
A sub-channel for mail connections.Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
-
Field Summary
FieldsFields inherited from class org.jgrapes.mail.MailComponent
mailProps
-
Constructor Summary
ConstructorsConstructorDescriptionMailConnectionManager
(Channel componentChannel) Creates a new server using the given channel. -
Method Summary
Modifier and TypeMethodDescriptionReturns the executor service.setExecutorService
(ExecutorService executorService) Sets an executor service to be used by the event pipelines that process the data from the network.Methods inherited from class org.jgrapes.mail.MailComponent
configureComponent, onConfigUpdate, setMailProperties, toString
Methods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setName
Methods inherited from class org.jgrapes.core.internal.ComponentVertex
activeEventPipeline, addHandler, attach, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, unregisterAsGenerator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
channels
-
-
Constructor Details
-
MailConnectionManager
Creates a new server using the given channel.- Parameters:
componentChannel
- the component’s channel
-
-
Method Details
-
setExecutorService
Sets an executor service to be used by the event pipelines that process the data from the network.Setting this to an executor service with a limited number of threads allows to control the maximum load from the network.
- Parameters:
executorService
- the executorService to set- Returns:
- the TCP connection manager for easy chaining
- See Also:
-
executorService
Returns the executor service.- Returns:
- the executorService
-