Package org.apache.mailet

Examples of org.apache.mailet.Mailet


    @Override
    public Mailet getMailet(MailetConfig config) throws MessagingException {
        try {
            Class<Mailet> clazz = (Class<Mailet>) Thread.currentThread().getContextClassLoader().loadClass(config.
                    getMailetName());
            Mailet m = clazz.newInstance();
            m.init(config);
            return m;
        } catch (Exception e) {
            throw new MessagingException("Unable to load mailet " + config.getMailetName());
        }
View Full Code Here


     * @throws MalformedObjectNameException
     */
    private void registerMailets(String parentMBeanName, Iterator<Mailet> mailets) throws JMException {
        int i = 0;
        while (mailets.hasNext()) {
            Mailet mailet = mailets.next();
            MailetManagement mailetManagement = new MailetManagement(mailet.getMailetConfig());

            String mailetMBeanName = parentMBeanName + ",subtype=mailet,index=" + (i++) + ",mailetname=" + mailetManagement.getMailetName();
            registerMBean(mailetMBeanName, mailetManagement);
            mailetMap.put(mailet, mailetManagement);
        }
View Full Code Here

TOP

Related Classes of org.apache.mailet.Mailet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.