本文整理汇总了Java中org.subethamail.smtp.MessageContext类的典型用法代码示例。如果您正苦于以下问题:Java MessageContext类的具体用法?Java MessageContext怎么用?Java MessageContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MessageContext类属于org.subethamail.smtp包,在下文中一共展示了MessageContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testCompletedMailTransaction
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
@Test
public void testCompletedMailTransaction() throws Exception {
new Expectations() {
{
messageHandlerFactory.create((MessageContext) any);
result = messageHandler;
messageHandler.from(anyString);
messageHandler.recipient(anyString);
messageHandler.data((InputStream) any);
messageHandler.done();
}
};
SmartClient client = new SmartClient("localhost", smtpServer.getPort(),
"localhost");
client.from("[email protected]");
client.to("[email protected]");
client.dataStart();
client.dataWrite(TextUtils.getAsciiBytes("body"), 4);
client.dataEnd();
client.quit();
smtpServer.stop(); // wait for the server to catch up
}
示例2: testAbortedMailTransaction
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
@Test
public void testAbortedMailTransaction() throws Exception {
new Expectations() {
{
messageHandlerFactory.create((MessageContext) any);
result = messageHandler;
messageHandler.from(anyString);
messageHandler.done();
}
};
SmartClient client = new SmartClient("localhost", smtpServer.getPort(),
"localhost");
client.from("[email protected]");
client.quit();
smtpServer.stop(); // wait for the server to catch up
}
示例3: create
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
@Override
public SMTPHandler create(MessageContext ctx) {
SMTPHandler smtpHandler = new SMTPHandler(ctx);
beanFactory.autowireBean(smtpHandler);
return smtpHandler;
}
示例4: testDisconnectImmediately
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
@Test
public void testDisconnectImmediately() throws Exception {
new Expectations() {
{
messageHandlerFactory.create((MessageContext) any);
times = 0;
}
};
SmartClient client = new SmartClient("localhost", smtpServer.getPort(),
"localhost");
client.quit();
smtpServer.stop(); // wait for the server to catch up
}
示例5: create
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
@Override
public MessageHandler create(MessageContext ctx) {
MailTransactionImpl mailTransaction = new MailTransactionImpl(ctx);
FilterInstances filterInstances =
filters.createInstanceChain(mailTransaction);
FilterChainMessageHandler filterChainMessageHandler =
new FilterChainMessageHandler(filterInstances, mailTransaction);
return new ErrorHandlerMessageHandler(filterChainMessageHandler);
}
示例6: create
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
public MessageHandler create(MessageContext ctx) {
return new Handler(ctx);
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:4,代码来源:MyMessageHandlerFactory.java
示例7: Handler
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
public Handler(MessageContext ctx) {
this.ctx = ctx;
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:4,代码来源:MyMessageHandlerFactory.java
示例8: Handler
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
public Handler(MessageContext ctx) {
}
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:3,代码来源:MailJobTestCase.java
示例9: create
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
public MessageHandler create(MessageContext messageContext)
{
return new Handler(messageContext);
}
示例10: Handler
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
public Handler(MessageContext messageContext)
{
this.messageContext = messageContext;
}
示例11: getMessageContext
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
public MessageContext getMessageContext()
{
return messageContext;
}
示例12: create
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
@Override
public MessageHandler create(MessageContext ctx) {
return myMessageHandler;
}
示例13: create
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
public MessageHandler create(MessageContext ctx)
{
return new Handler(ctx);
}
示例14: Handler
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
/** */
Handler(MessageContext ctx)
{
this.ctx = ctx;
}
示例15: Handler
import org.subethamail.smtp.MessageContext; //导入依赖的package包/类
/** */
public Handler(MessageContext ctx)
{
this.ctx = ctx;
}