public class MailService extends MailClient
Constructor and Description |
---|
MailService(MailService delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close the MailClient
|
static MailService |
createEventBusProxy(Vertx vertx,
String address)
create a proxy of MailService that delegates to the mail service running somewhere else via the event bus
|
Object |
getDelegate() |
static MailService |
newInstance(MailService arg) |
MailService |
sendMail(MailMessage email,
Handler<AsyncResult<MailResult>> resultHandler)
send a single mail via MailClient
|
Observable<MailResult> |
sendMailObservable(MailMessage email)
send a single mail via MailClient
|
createNonShared, createShared, createShared, newInstance
public MailService(MailService delegate)
public Object getDelegate()
getDelegate
in class MailClient
public static MailService createEventBusProxy(Vertx vertx, String address)
vertx
- the Vertx instance the proxy will be run inaddress
- the eb address of the mail service running somewhere, default is "vertx.mail"public MailService sendMail(MailMessage email, Handler<AsyncResult<MailResult>> resultHandler)
MailClient
sendMail
in class MailClient
email
- MailMessage object containing the mail text, from/to, attachments etcresultHandler
- will be called when the operation is finished or it fails (may be null to ignore the result)public Observable<MailResult> sendMailObservable(MailMessage email)
MailClient
sendMailObservable
in class MailClient
email
- MailMessage object containing the mail text, from/to, attachments etcpublic void close()
MailClient
close
in class MailClient
public static MailService newInstance(MailService arg)
Copyright © 2016. All rights reserved.