Package org.jgrapes.mail
Class MailSender.SenderChannel
- All Implemented Interfaces:
Associator
,Channel
,Eligible
,Subchannel
,MailChannel
- Enclosing class:
MailSender
protected class MailSender.SenderChannel
extends MailConnectionManager<MailSender.SenderChannel,Event<?>>.AbstractMailChannel
The specific implementation of the
MailChannel
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
Nested classes/interfaces inherited from interface org.jgrapes.core.Subchannel
Subchannel.DefaultSubchannel
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSenderChannel
(Event<?> event, Channel mainChannel, Properties sessionProps, Optional<Password> password) Instantiates a new monitor channel. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the connection.protected void
Close the connection (not the channel).protected void
sendMessage
(SendMailMessage event) Send the message provided by the event.Methods inherited from class org.jgrapes.mail.MailConnectionManager.AbstractMailChannel
openEvent
Methods inherited from class org.jgrapes.io.util.ConnectionManager.Connection
downPipeline
Methods inherited from class org.jgrapes.core.Subchannel.DefaultSubchannel
associated, mainChannel, setAssociated, toString
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, associated, associatedGet, setAssociated
Methods inherited from interface org.jgrapes.core.Subchannel
defaultCriterion, isEligibleFor, mainChannel
-
Constructor Details
-
SenderChannel
public SenderChannel(Event<?> event, Channel mainChannel, Properties sessionProps, Optional<Password> password) throws MessagingException Instantiates a new monitor channel.- Parameters:
event
- the event that triggered the creationmainChannel
- the main channel (of thisSubchannel
)sessionProps
- the session propertiespassword
- the password- Throws:
MessagingException
- the messaging exception
-
-
Method Details
-
sendMessage
Send the message provided by the event.- Parameters:
event
- the event- Throws:
MessagingException
-
close
Description copied from class:ConnectionManager.Connection
Closes the connection.If the last connection is closed and the component is a generator (see {@link ConnectionManager#connectionsGenerate()), the component is unregistered as generator.
- Overrides:
close
in classConnectionManager<MailSender.SenderChannel>.Connection
-
closeConnection
Close the connection (not the channel).May be reopened later if closed due to idle time over.
-