|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object AbstractLocalRpcService com.google.appengine.api.mail.dev.LocalMailService
@ServiceProvider(value=) public final class LocalMailService
Stub implementation of the Google App Engine mail api.
This implementation logs messages using a Logger
associated with
this class and keeps messages that were sent in memory. If you want to
access the list of sent messages you can get ahold of the registered
LocalMailService instance as follows:
You can then access the list viaApiProxyLocal proxy = (ApiProxyLocal) ApiProxy.getDelegate(); LocalMailService mailService = (LocalMailService)delegate.getService(LocalMailService.PACKAGE);
getSentMessages()
and clear the
list via clearSentMessages()
.
By default, messages are logged at Level.INFO
and the body of the
message is excluded. The log level and whether or not the body of the
message is logged can be configured. See LOG_MAIL_BODY_PROPERTY
and LOG_MAIL_LEVEL_PROPERTY
for more information.
Field Summary | |
---|---|
static java.lang.String |
LOG_MAIL_BODY_PROPERTY
Init property that determines whether or not we log the body of the email. |
static java.lang.String |
LOG_MAIL_LEVEL_PROPERTY
Init property that specifies the Level at which we log mail
messages. |
static java.lang.String |
PACKAGE
The package name for this service. |
Constructor Summary | |
---|---|
LocalMailService()
|
Method Summary | |
---|---|
void |
clearSentMessages()
Clear the list of sent messages. |
java.lang.Integer |
getMaxApiRequestSize()
|
java.lang.String |
getPackage()
|
java.util.List<MailServicePb.MailMessage> |
getSentMessages()
|
void |
init(LocalServiceContext context,
java.util.Map<java.lang.String,java.lang.String> properties)
|
ApiBasePb.VoidProto |
send(Status status,
MailServicePb.MailMessage msg)
|
ApiBasePb.VoidProto |
sendToAdmins(Status status,
MailServicePb.MailMessage msg)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PACKAGE
public static final java.lang.String LOG_MAIL_BODY_PROPERTY
Boolean.TRUE
or
Boolean.FALSE
.
public static final java.lang.String LOG_MAIL_LEVEL_PROPERTY
Level
at which we log mail
messages. Value must be a string representation of a Level
(calling Level.parse(String)
with the value as the arg should
return a valid instance).
Constructor Detail |
---|
public LocalMailService()
Method Detail |
---|
public java.lang.String getPackage()
public void init(LocalServiceContext context, java.util.Map<java.lang.String,java.lang.String> properties)
public void start()
public void stop()
public ApiBasePb.VoidProto send(Status status, MailServicePb.MailMessage msg)
public ApiBasePb.VoidProto sendToAdmins(Status status, MailServicePb.MailMessage msg)
public java.util.List<MailServicePb.MailMessage> getSentMessages()
public void clearSentMessages()
public java.lang.Integer getMaxApiRequestSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |