Package org.jgrapes.mail.events
Class OpenMailConnection
- All Implemented Interfaces:
Future<Void>
,Associator
,Eligible
- Direct Known Subclasses:
OpenMailMonitor
,OpenMailSender
Common base class for events that open a mail connection for
sending or receiving mail.
Note that all configuration information (such as mail server, protocol, user name) is provided as mail properties (see {@link #setMailProperties(Map)).
Also note that a component receiving the event may have default or system wide values configured for the properties.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
Fields inherited from class org.jgrapes.core.internal.EventBase
completed, completionEvents, invokedFor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the mail properties.password()
Returns the password.setMailProperties
(Map<String, String> props) Specifies mail properties that override defaults set for the handlingMailConnectionManager
.setMailProperty
(String name, String value) Sets a single mail property, seesetMailProperties(Map)
.setPassword
(Password password) Sets the password used for opening the connection.Methods inherited from class org.jgrapes.core.Event
addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handled, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, resumeHandling, setAssociated, setChannels, setRequiresResult, setResult, stop, suspendHandling, suspendHandling, tieTo, toString
Methods inherited from class org.jgrapes.core.internal.EventBase
disableTracking, enqueued, firstResultAssigned, isTracked, onCompletion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associatedGet
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
OpenMailConnection
public OpenMailConnection()
-
-
Method Details
-
setMailProperties
Specifies mail properties that override defaults set for the handlingMailConnectionManager
.Merges the given properties with properties already set for the event.
- Parameters:
props
- the props- Returns:
- the event
-
setMailProperty
Sets a single mail property, seesetMailProperties(Map)
.- Parameters:
name
- the namevalue
- the value- Returns:
- the open mail connection
-
mailProperties
Returns the mail properties.- Returns:
- the map
-
setPassword
Sets the password used for opening the connection.- Parameters:
password
- the password- Returns:
- the open mail connection
-
password
Returns the password.- Returns:
- the password
-