james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-james/src/org/apache/mailet Mail.java Mailet.java MailetConfig.java MailetContext.java Matcher.java MatcherConfig.java
Date Mon, 05 Mar 2001 15:01:19 GMT
donaldp     01/03/05 07:01:19

  Modified:    src/org/apache/mailet Mail.java Mailet.java
                        MailetConfig.java MailetContext.java Matcher.java
                        MatcherConfig.java
  Log:
  Made James conform to the JLS spec closer.
  
  Did this by removing any structures that are "strongly discouraged".
  
  Revision  Changes    Path
  1.4       +15 -15    jakarta-james/src/org/apache/mailet/Mail.java
  
  Index: Mail.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/mailet/Mail.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Mail.java	2000/10/16 05:00:33	1.3
  +++ Mail.java	2001/03/05 15:00:53	1.4
  @@ -26,10 +26,10 @@
    * @version 0.9
    */
   public interface Mail extends Serializable, Cloneable {
  -    public final static String GHOST = "ghost";
  -    public final static String DEFAULT = "root";
  -    public final static String ERROR = "error";
  -    public final static String TRANSPORT = "transport";
  +    String GHOST = "ghost";
  +    String DEFAULT = "root";
  +    String ERROR = "error";
  +    String TRANSPORT = "transport";
   
       /**
        * Returns the MimeMessage stored in this message
  @@ -37,56 +37,56 @@
        * @return the MimeMessage that this Mail object wraps
        * @throws MessagingException - an error occured while loading this object
        */
  -    public MimeMessage getMessage() throws MessagingException;
  +    MimeMessage getMessage() throws MessagingException;
   
       /**
        * Returns a Collection of MailAddress objects that are recipients of this message
        *
        * @return a Collection of MailAddress objects that are recipients of this message
        */
  -    public Collection getRecipients();
  +    Collection getRecipients();
   
       /**
        * The sender of the message, as specified by the MAIL FROM header, or internally defined
        *
        * @return a MailAddress of the sender of this message
        */
  -    public MailAddress getSender();
  +    MailAddress getSender();
   
       /**
        * The current state of the message, such as GHOST, ERROR, or DEFAULT
        *
        * @return the state of this message
        */
  -    public String getState();
  +    String getState();
   
       /**
        * The remote hostname of the server that connected to send this message
        *
        * @return a String of the hostname of the server that connected to send this message
        */
  -    public String getRemoteHost();
  +    String getRemoteHost();
   
       /**
        * The remote ip address of the server that connected to send this message
        *
        * @return a String of the ip address of the server that connected to send this message
        */
  -    public String getRemoteAddr();
  +    String getRemoteAddr();
   
       /**
        * The error message, if any, associated with this message.  Not sure why this is needed.
        *
        * @return a String of a descriptive error message
        */
  -    public String getErrorMessage();
  +    String getErrorMessage();
   
       /**
        * Sets the error message associated with this message.  Not sure why this is needed.
        *
        * @param msg - a descriptive error message
        */
  -    public void setErrorMessage(String msg);
  +    void setErrorMessage(String msg);
   
       /**
        * Sets the MimeMessage associated with this message via an inputstream.  The Mail
  @@ -95,19 +95,19 @@
        * @param in - the inputstream to read to construct the MimeMessage
        * @throws MessagingException - if there was an error parsing the inputstream
        */
  -    public void setMessage(InputStream in) throws MessagingException;
  +    void setMessage(InputStream in) throws MessagingException;
   
       /**
        * Sets the MimeMessage associated with this message via the object.
        *
        * @param message - the new MimeMessage that this Mail object will wrap
        */
  -    public void setMessage(MimeMessage message);
  +    void setMessage(MimeMessage message);
   
       /**
        * Sets the state of this message.
        *
        * @param state - the new state of this message
        */
  -    public void setState(String state);
  +    void setState(String state);
   }
  
  
  
  1.3       +5 -6      jakarta-james/src/org/apache/mailet/Mailet.java
  
  Index: Mailet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/mailet/Mailet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Mailet.java	2000/10/16 05:01:54	1.2
  +++ Mailet.java	2001/03/05 15:00:55	1.3
  @@ -52,7 +52,7 @@
        * are being held (for example, memory, file handles, threads) and make sure
        * that any persistent state is synchronized with the mailet's current state in memory.
        */
  -    public void destroy();
  +    void destroy();
   
       /**
        * Returns information about the mailet, such as author, version, and
  @@ -63,7 +63,7 @@
        *
        * @return a String containing servlet information
        */
  -    public String getMailetInfo();
  +    String getMailetInfo();
   
       /**
        * Returns a MailetConfig object, which contains initialization and
  @@ -75,7 +75,7 @@
        *
        * @return the MailletConfig object that initializes this mailet
        */
  -    public MailetConfig getMailetConfig();
  +    MailetConfig getMailetConfig();
   
       /**
        * Called by the mailet container to indicate to a mailet that the
  @@ -90,7 +90,7 @@
        * @throws MessagingException - if an exception has occurred that interferes with
        *          the mailet's normal operation
        */
  -    public void init(MailetConfig config) throws javax.mail.MessagingException;
  +    void init(MailetConfig config) throws javax.mail.MessagingException;
   
       /**
        * Called by the mailet container to allow the mailet to process to
  @@ -110,6 +110,5 @@
        * @throws javax.mail.MessagingException - if an message or address parsing exception
occurs or
        *      an exception that interferes with the mailet's normal operation
        */
  -    public void service(Mail mail) throws javax.mail.MessagingException;
  -
  +    void service(Mail mail) throws javax.mail.MessagingException;
   }
  
  
  
  1.2       +4 -4      jakarta-james/src/org/apache/mailet/MailetConfig.java
  
  Index: MailetConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/mailet/MailetConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MailetConfig.java	2000/09/13 00:38:45	1.1
  +++ MailetConfig.java	2001/03/05 15:00:57	1.2
  @@ -30,7 +30,7 @@
        * @param name - a String specifying the name of the initialization parameter
        * @return a String containing the value of the initialization parameter
        */
  -    public String getInitParameter(String name);
  +    String getInitParameter(String name);
   
       /**
        * Returns the names of the mailet's initialization parameters as an
  @@ -40,7 +40,7 @@
        * @return an Iterator of String objects containing the names of the mailet's
        *      initialization parameters
        */
  -    public Iterator getInitParameterNames();
  +    Iterator getInitParameterNames();
   
       /**
        * Returns a reference to the MailetContext in which the mailet is
  @@ -49,7 +49,7 @@
        * @return a MailetContext object, used by the mailet to interact with its
        *      mailet container
        */
  -    public MailetContext getMailetContext();
  +    MailetContext getMailetContext();
   
       /**
        * Returns the name of this mailet instance. The name may be provided via
  @@ -59,5 +59,5 @@
        *
        * @return the name of the mailet instance
        */
  -    public String getMailetName();
  +    String getMailetName();
   }
  
  
  
  1.4       +23 -19    jakarta-james/src/org/apache/mailet/MailetContext.java
  
  Index: MailetContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/mailet/MailetContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MailetContext.java	2000/10/16 04:59:42	1.3
  +++ MailetContext.java	2001/03/05 15:00:59	1.4
  @@ -38,7 +38,7 @@
        * @param mail - the message that is to be bounced and sender to whom to return the
message
        * @param message - a descriptive message as to why the message bounced
        */
  -    public void bounce(Mail mail, String message) throws MessagingException;
  +    void bounce(Mail mail, String message) throws MessagingException;
   
       /**
        * Bounces the email message using the provided email address as the
  @@ -48,7 +48,7 @@
        * @param message - a descriptive message as to why the message bounced
        * @param bouncer - the address to give as the sender of the bounced message
        */
  -    public void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException;
  +    void bounce(Mail mail, String message, MailAddress bouncer) throws MessagingException;
   
       /**
        * Returns a Collection of Strings of hostnames or ip addresses that
  @@ -59,14 +59,14 @@
        * @param host - the domain name for which to find mail servers
        * @return a Collection of Strings of hostnames, sorted by priority
        */
  -    public Collection getMailServers(String host);
  +    Collection getMailServers(String host);
   
       /**
        * Returns the postmaster's address for this mailet context.
        *
        * @return a MailAddress of the Postmaster's address
        */
  -    public MailAddress getPostmaster();
  +    MailAddress getPostmaster();
   
       /**
        * Returns the mailet container attribute with the given name, or null
  @@ -83,7 +83,7 @@
        * @return an Object containing the value of the attribute, or null if no attribute
        *      exists matching the given name
        */
  -    public Object getAttribute(String name);
  +    Object getAttribute(String name);
   
       /**
        * Returns an Iterator containing the attribute names available within
  @@ -92,7 +92,7 @@
        *
        * @return an Iterator of attribute names
        */
  -    public Iterator getAttributeNames();
  +    Iterator getAttributeNames();
   
       /**
        * Returns the minor version of the Mailet API that this mailet
  @@ -101,7 +101,7 @@
        *
        * @return 1
        */
  -    public int getMajorVersion();
  +    int getMajorVersion();
   
       /**
        * Returns the minor version of the Mailet API that this mailet
  @@ -110,7 +110,7 @@
        *
        * @return 2
        */
  -    public int getMinorVersion();
  +    int getMinorVersion();
   
       /**
        * Returns the name and version of the mailet container on which
  @@ -124,7 +124,7 @@
        *
        * @return a String containing at least the mailet container name and version number
        */
  -    public String getServerInfo();
  +    String getServerInfo();
   
       /**
        * Returns a Collection of the server names that are considered "local"
  @@ -132,7 +132,7 @@
        *
        * @return a Collection of Strings of hostnames that are considered "local"
        */
  -    public Collection getServerNames();
  +    Collection getServerNames();
   
       /**
        * Returns a Collection of the local user accounts within this mailet
  @@ -140,7 +140,7 @@
        *
        * @return a Collection of Strings of usernames that are considered "local"
        */
  -    public Collection getLocalUsers();
  +    Collection getLocalUsers();
   
       /**
        * Writes the specified message to a mailet log file, usually an event
  @@ -149,7 +149,7 @@
        *
        * @param msg - a String specifying the message to be written to the log file
        */
  -    public void log(String message);
  +    void log(String message);
   
       /**
        * Writes an explanatory message and a stack trace for a given Throwable
  @@ -158,7 +158,7 @@
        * @param message - a String that describes the error or exception
        * @param throwable - the Throwable error or exception
        */
  -    public void log(String message, Throwable t);
  +    void log(String message, Throwable t);
   
       /**
        * Removes the attribute with the given name from the mailet context.  After
  @@ -167,7 +167,7 @@
        *
        * @param name - a String specifying the name of the attribute to be removed
        */
  -    public void removeAttribute(String name);
  +    void removeAttribute(String name);
   
       /**
        * Send an outgoing message to the top of this mailet container's root queue.
  @@ -177,7 +177,8 @@
        * @param msg - the MimeMessage of the headers and body content of the outgoing message
        * @throws MessagingException - if the message fails to parse
        */
  -    public void sendMail(MimeMessage msg) throws MessagingException;
  +    void sendMail(MimeMessage msg) 
  +        throws MessagingException;
   
       /**
        * Send an outgoing message to the top of this mailet container's root queue.
  @@ -188,7 +189,8 @@
        * @param msg - the MimeMessage of the headers and body content of the outgoing message
        * @throws MessagingException - if the message fails to parse
        */
  -    public void sendMail(MailAddress sender, Collection recipients, MimeMessage msg) throws
MessagingException;
  +    void sendMail(MailAddress sender, Collection recipients, MimeMessage msg) 
  +        throws MessagingException;
   
       /**
        * Send an outgoing message to the top of this mailet container queue for the
  @@ -200,7 +202,8 @@
        * @param state - the state of the message, indicates which processor to use
        * @throws MessagingException - if the message fails to parse
        */
  -    public void sendMail(MailAddress sender, Collection recipients, MimeMessage msg, String
state) throws MessagingException;
  +    void sendMail(MailAddress sender, Collection recipients, MimeMessage msg, String state)

  +        throws MessagingException;
   
       /**
        * Binds an object to a given attribute name in this mailet context.  If the name
  @@ -213,7 +216,7 @@
        * @param name - a String specifying the name of the attribute
        * @param object - an Object representing the attribute to be bound
        */
  -    public void setAttribute(String name, Object object);
  +    void setAttribute(String name, Object object);
   
       /**
        * Stores mail into local accounts (POP3 by default, or the IMAP4 Inbox)
  @@ -223,5 +226,6 @@
        * @param msg - the MimeMessage to store in a local mailbox
        * @throws MessagingException - if the message fails to parse
        */
  -    public void storeMail(MailAddress sender, MailAddress recipient, MimeMessage msg) throws
MessagingException;
  +    void storeMail(MailAddress sender, MailAddress recipient, MimeMessage msg) 
  +        throws MessagingException;
   }
  
  
  
  1.4       +5 -6      jakarta-james/src/org/apache/mailet/Matcher.java
  
  Index: Matcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/mailet/Matcher.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Matcher.java	2000/10/16 05:01:54	1.3
  +++ Matcher.java	2001/03/05 15:01:01	1.4
  @@ -68,7 +68,7 @@
        * are being held (for example, memory, file handles, threads) and make sure
        * that any persistent state is synchronized with the matcher's current state in memory.
        */
  -    public void destroy();
  +    void destroy();
   
       /**
        * Returns a MatcherConfig object, which contains initialization and
  @@ -80,7 +80,7 @@
        *
        * @return the MatcherConfig object that initializes this matcher
        */
  -    public MatcherConfig getMatcherConfig();
  +    MatcherConfig getMatcherConfig();
   
       /**
        * Returns information about the matcher, such as author, version, and copyright.
  @@ -90,7 +90,7 @@
        *
        * @return a String containing matcher information
        */
  -    public String getMatcherInfo();
  +    String getMatcherInfo();
   
       /**
        * Called by the mailet container to indicate to a matcher that the
  @@ -105,7 +105,7 @@
        * @throws javax.mail.MessagingException - if an exception has occurred that
        *          interferes with the matcher's normal operation
        */
  -    public void init(MatcherConfig config) throws javax.mail.MessagingException;
  +    void init( MatcherConfig config ) throws javax.mail.MessagingException;
   
       /**
        * Takes a Mail message, looks at any pertinent information, and then returns a subset
  @@ -126,6 +126,5 @@
        * @throws MessagingException - if an message or address parsing exception occurs or
        *      an exception that interferes with the matcher's normal operation
        */
  -    public Collection match(Mail mail) throws javax.mail.MessagingException;
  -
  +    Collection match( Mail mail ) throws javax.mail.MessagingException;
   }
  
  
  
  1.2       +3 -3      jakarta-james/src/org/apache/mailet/MatcherConfig.java
  
  Index: MatcherConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/org/apache/mailet/MatcherConfig.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MatcherConfig.java	2000/09/13 00:38:47	1.1
  +++ MatcherConfig.java	2001/03/05 15:01:03	1.2
  @@ -27,7 +27,7 @@
        *
        * @return a String containing the value of the initialization parameter
        */
  -    public String getCondition();
  +    String getCondition();
   
       /**
        * Returns a reference to the MailetContext in which the matcher is executing
  @@ -35,7 +35,7 @@
        * @return a MailetContext object, used by the matcher to interact with its
        *      mailet container
        */
  -    public MailetContext getMailetContext();
  +    MailetContext getMailetContext();
   
       /**
        * Returns the name of this matcher instance. The name may be provided via server
  @@ -45,5 +45,5 @@
        *
        * @return the name of the matcher instance
        */
  -    public String getMatcherName();
  +    String getMatcherName();
   }
  
  
  

Mime
View raw message