Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.net.axis.transport.mailto
Class AbstractMailTransportService

    java.lang.Object
      org.jboss.mx.util.JBossNotificationBroadcasterSupport
          org.jboss.system.ServiceMBeanSupport
              org.jboss.net.axis.transport.mailto.AbstractMailTransportService

All Implemented Interfaces:
  MailConstants, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean

Direct Known Subclasses:
  AsyncMailClientService, MailTransportService

public abstract class AbstractMailTransportService
extends org.jboss.system.ServiceMBeanSupport
implements MailConstants

Title:
  Abstract Mail Transport Service

Description:
  Both the client and server side email transport services are based off of this class.

Version:
  $Revision: 1.1 $
Author:
  Jason Essington

Field Summary
`static String` | `ENGINE_NAME`
`static String` | `FOLDER_NAME`
`static String` | `SESSION_NAME`

Fields inherited from class org.jboss.system.ServiceMBeanSupport
`log, server, SERVICE_CONTROLLER_SIG, serviceName`

Fields inherited from interface org.jboss.net.axis.transport.mailto.MailConstants
`HEADER_CONTENT_TRANSFER_ENCODING, HEADER_CONTENT_TYPE, HEADER_FROM, HEADER_IN_REPLY_TO, HEADER_MESSAGE_ID, HEADER_TO`

Fields inherited from interface org.jboss.system.ServiceMBean
`CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED`

Constructor Summary
`AbstractMailTransportService()`

Method Summary
`protected void` | `closeFolder(javax.mail.Folder folder)` This closes a mail folder and handles exceptions by pretending they didn't happen.
`protected void` | `closeStore(javax.mail.Store store)` This closes the mail store and suppresses any exceptions.
`protected javax.mail.Message[]` | `fetchMessages(javax.mail.Folder folder)` Lets preload some information about our mail messages into message objects.
`boolean` | `getDeleteMail()`
`String` | `getEngineName()`
`String` | `getFolderName()`
`protected javax.mail.Folder` | `getMailFolder(javax.mail.Store store)`
`protected javax.mail.Session` | `getMailSession()` Fetch the mail session stored in jndi.
`protected javax.mail.Store` | `getMailStore(javax.mail.Session mail)`
`String` | `getSessionName()`
`void` | `pollMail()` Check our pop mail box for new emails.
`protected abstract void` | `processMessages(javax.mail.Message[] msgs)`
`void` | `setDeleteMail(boolean delete)` Flag instructing the transport to delete processed messages, or not.
`void` | `setEngineName(String name)` The jndi name under which the org.apache.axis.server.AxisServer object is stored.
`void` | `setFolderName(String name)` The name of the folder in which the SOAP messages will reside (likely INBOX).
`void` | `setSessionName(String name)` The jndi name under which the javax.mail.Session object is stored.

Methods inherited from class org.jboss.system.ServiceMBeanSupport
`create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService`

Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
`addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FOLDER_NAME

    public static final String FOLDER_NAME

See Also:
  Constant Field Values

### SESSION_NAME

    public static final String SESSION_NAME

See Also:
  Constant Field Values

### ENGINE_NAME

    public static final String ENGINE_NAME

See Also:
  Constant Field Values

Constructor Detail

### AbstractMailTransportService

    public AbstractMailTransportService()

Method Detail

### setSessionName

    public void setSessionName(String name)

  The jndi name under which the javax.mail.Session object is stored.

### getSessionName

    public String getSessionName()

### setFolderName

    public void setFolderName(String name)

  The name of the folder in which the SOAP messages will reside (likely INBOX).

### getFolderName

    public String getFolderName()

### setEngineName

    public void setEngineName(String name)

  The jndi name under which the org.apache.axis.server.AxisServer object is stored.

### getEngineName

    public String getEngineName()

### setDeleteMail

    public void setDeleteMail(boolean delete)

  Flag instructing the transport to delete processed messages, or not.

### getDeleteMail

    public boolean getDeleteMail()

### pollMail

    public void pollMail()

  Check our pop mail box for new emails. maybe an exception of some sort should be thrown if something bad happens? currently all exceptions are logged and execution of this method terminates with nothing else happening.

### processMessages

    protected abstract void processMessages(javax.mail.Message[] msgs)

### getMailSession

    protected javax.mail.Session getMailSession()

  Fetch the mail session stored in jndi.

  Returns:
    Session

### getMailStore

    protected javax.mail.Store getMailStore(javax.mail.Session mail)

### getMailFolder

    protected javax.mail.Folder getMailFolder(javax.mail.Store store)

### fetchMessages

    protected javax.mail.Message[] fetchMessages(javax.mail.Folder folder)

  Lets preload some information about our mail messages into message objects.

  Returns:
    Message[]

### closeStore

    protected void closeStore(javax.mail.Store store)

  This closes the mail store and suppresses any exceptions. For use when bailing out due to an error of some sort.

  Parameters:
    `store` -

### closeFolder

    protected void closeFolder(javax.mail.Folder folder)

  This closes a mail folder and handles exceptions by pretending they didn't happen. Only do this if you are leaving and the resulting state of the folder is of no consequence to you.

  Parameters:
    `folder` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.