Java Doc for GenericMatcher.java in  » Net » james-2.3.1 » org » apache » mailet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » james 2.3.1 » org.apache.mailet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.mailet.GenericMatcher

All known Subclasses:   org.apache.james.transport.matchers.SMTPAuthUserIs,  org.apache.james.transport.matchers.CompareNumericHeaderValue,  org.apache.james.transport.matchers.smime.IsSMIMEEncrypted,  org.apache.james.transport.matchers.FetchedFrom,  org.apache.james.transport.matchers.SubjectStartsWith,  org.apache.james.transport.matchers.AbstractQuotaMatcher,  org.apache.james.transport.matchers.HasMailAttribute,  org.apache.james.transport.matchers.HasMailAttributeWithValue,  org.apache.james.transport.matchers.GenericRegexMatcher,  org.apache.mailet.GenericRecipientMatcher,  org.apache.james.transport.matchers.SenderIsNull,  org.apache.james.transport.matchers.IsInWhiteList,  org.apache.james.transport.matchers.SMTPAuthSuccessful,  org.apache.james.transport.matchers.SubjectIs,  org.apache.james.transport.matchers.HasHabeasWarrantMark,  org.apache.james.transport.matchers.HasAttachment,  org.apache.james.transport.matchers.InSpammerBlacklist,  org.apache.james.transport.matchers.HasMailAttributeWithValueRegex,  org.apache.james.transport.matchers.smime.IsSMIMESigned,  org.apache.james.transport.matchers.All,  org.apache.james.transport.matchers.AttachmentFileNameIs,  org.apache.james.transport.matchers.SenderIsRegex,  org.apache.james.transport.matchers.SenderIs,  org.apache.james.transport.matchers.SenderHostIs,  org.apache.james.transport.matchers.smime.IsX509CertificateSubject,  org.apache.james.transport.matchers.RelayLimit,  org.apache.james.transport.matchers.AbstractNetworkMatcher,  org.apache.james.transport.matchers.HasHeader,  org.apache.james.transport.matchers.SizeGreaterThan,  org.apache.james.transport.matchers.IsSingleRecipient,
GenericMatcher
abstract public class GenericMatcher implements Matcher,MatcherConfig(Code)

GenericMatcher implements the Matcher and MatcherConfig interfaces.

GenericMatcher makes writing matchers easier. It provides simple versions of the lifecycle methods init and destroy and of the methods in the MatcherConfig interface. GenericMatcher also implements the log method, declared in the MatcherContext interface.

To write a generic matcher, you need only override the abstract match method.


version:
   1.0.0, 24/04/1999


Field Summary
 MatcherConfigconfig
    


Method Summary
public  voiddestroy()
     Called by the mailet container to indicate to a matcher that the matcher is being taken out of service.
public  StringgetCondition()
    

Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.

This method is supplied for convenience.

public  MailetContextgetMailetContext()
     Returns a reference to the MailetContext in which this matcher is running.
public  MatcherConfiggetMatcherConfig()
     Returns this matcher's MatcherConfig object.
public  StringgetMatcherInfo()
     Returns information about the matcher, such as author, version, and copyright.
public  StringgetMatcherName()
     Returns the name of this matcher instance.
public  voidinit(MatcherConfig newConfig)
    

Called by the matcher container to indicate to a matcher that the matcher is being placed into service.

This implementation stores the MatcherConfig object it receives from the matcher container for alter use.

public  voidinit()
    

A convenience method which can be overridden so that there's no need to call super.init(config).

Instead of overriding init(MatcherConfig), simply override this method and it will be called by GenericMatcher.init(MatcherConfig config).

public  voidlog(String message)
     Writes the specified message to a matcher log file, prepended by the matcher's name.
public  voidlog(String message, Throwable t)
     Writes an explanatory message and a stack trace for a given Throwable exception to the matcher log file, prepended by the matcher's name.
abstract public  Collectionmatch(Mail mail)
    

Field Detail
config
MatcherConfig config(Code)





Method Detail
destroy
public void destroy()(Code)
Called by the mailet container to indicate to a matcher that the matcher is being taken out of service.



getCondition
public String getCondition()(Code)

Returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.

This method is supplied for convenience. It gets the value of the named parameter from the matcher's MatcherConfig object.

String a String containing the value of the initalization parameter



getMailetContext
public MailetContext getMailetContext()(Code)
Returns a reference to the MailetContext in which this matcher is running. MailetContext the MailetContext object passed to this matcher by the init method



getMatcherConfig
public MatcherConfig getMatcherConfig()(Code)
Returns this matcher's MatcherConfig object. MatcherConfig the MatcherConfig object that initialized this matcher



getMatcherInfo
public String getMatcherInfo()(Code)
Returns information about the matcher, such as author, version, and copyright. By default, this method returns an empty string. Override this method to have it return a meaningful value. String information about this matcher, by default an empty string



getMatcherName
public String getMatcherName()(Code)
Returns the name of this matcher instance. the name of this matcher instance



init
public void init(MatcherConfig newConfig) throws MessagingException(Code)

Called by the matcher container to indicate to a matcher that the matcher is being placed into service.

This implementation stores the MatcherConfig object it receives from the matcher container for alter use. When overriding this form of the method, call super.init(config).


Parameters:
  MatcherConfig - config - the MatcherConfig object that containsconfigutation information for this matcher
throws:
  MessagingException - if an exception occurs that interrupts the matcher's normal operation



init
public void init() throws MessagingException(Code)

A convenience method which can be overridden so that there's no need to call super.init(config).

Instead of overriding init(MatcherConfig), simply override this method and it will be called by GenericMatcher.init(MatcherConfig config). The MatcherConfig object can still be retrieved via getMatcherConfig().


throws:
  MatcherException - if an exception occurs that interrupts the matcher's normal operation



log
public void log(String message)(Code)
Writes the specified message to a matcher log file, prepended by the matcher's name.
Parameters:
  msg - - a String specifying the message to be written to the log file



log
public void log(String message, Throwable t)(Code)
Writes an explanatory message and a stack trace for a given Throwable exception to the matcher log file, prepended by the matcher's name.
Parameters:
  message - - a String that describes the error or exception
Parameters:
  t - - the java.lang.Throwable error or exception



match
abstract public Collection match(Mail mail) throws MessagingException(Code)

Called by the matcher container to allow the matcher to process a message.

This method is declared abstract so subclasses must override it.


Parameters:
  mail - - the Mail object that contains the MimeMessage androuting information java.util.Collection - the recipients that the mailet container should have themailet affect.
throws:
  javax.mail.MessagingException - - if an exception occurs that interferes with the mailet's normal operationoccurred



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.