net.sf.jportlet.service.mail
Class MailServiceImpl

java.lang.Object
  |
  +--net.sf.jportlet.service.PortletServiceAdapter
        |
        +--net.sf.jportlet.service.mail.MailServiceImpl
All Implemented Interfaces:
MailService, PortletService

public class MailServiceImpl
extends PortletServiceAdapter
implements MailService

Author:
Herve Tchepannou

Field Summary
 
Fields inherited from class net.sf.jportlet.service.PortletServiceAdapter
_log, _serviceConfig, _serviceContext
 
Fields inherited from interface net.sf.jportlet.service.mail.MailService
MIME_HTML, MIME_TEXT, NAME
 
Constructor Summary
MailServiceImpl()
           
 
Method Summary
 java.lang.String getServiceName()
          Returns the name of the service
 void init(net.sf.jportlet.service.PortletServiceConfig config)
          Initialize the service
 void send(javax.mail.Address from, javax.mail.Address[] to, java.lang.String subject, java.lang.String body, java.lang.String mimeType)
          Send an email
 
Methods inherited from class net.sf.jportlet.service.PortletServiceAdapter
destroy, getInitParameter, getInitParameter, getServiceConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jportlet.service.PortletService
destroy, getServiceConfig
 

Constructor Detail

MailServiceImpl

public MailServiceImpl()
Method Detail

send

public void send(javax.mail.Address from,
                 javax.mail.Address[] to,
                 java.lang.String subject,
                 java.lang.String body,
                 java.lang.String mimeType)
          throws javax.naming.NamingException,
                 javax.mail.MessagingException
Description copied from interface: MailService
Send an email

Specified by:
send in interface MailService
Throws:
javax.naming.NamingException - if the JNDINAme of the javax.mail.Session is invalid
javax.mail.MessagingException - if any error while sending the email
See Also:
net.sf.jportlet.service.mail.MailService#send(java.net.InetAddress, java.net.InetAddress[], java.lang.String, java.lang.String, java.lang.String)

getServiceName

public java.lang.String getServiceName()
Description copied from interface: PortletService
Returns the name of the service

Specified by:
getServiceName in interface PortletService
Returns:
String
See Also:
PortletService.getServiceName()

init

public void init(net.sf.jportlet.service.PortletServiceConfig config)
          throws PortletServiceException
Description copied from interface: PortletService
Initialize the service

Specified by:
init in interface PortletService
Overrides:
init in class PortletServiceAdapter
Parameters:
config - configuration of the service
PortletServiceException
See Also:
PortletService.init(net.sf.jportlet.service.PortletServiceConfig)


Copyright © 2002 Herve Tchepannou. All Rights Reserved.