Package com.mimecast.robin.bots
Interface BotProcessor
- All Known Implementing Classes:
EmailAnalysisBot,SessionBot
public interface BotProcessor
Bot processor interface for email infrastructure analysis bots.
Bots automatically analyze incoming emails and their infrastructure, then generate a reply with diagnostic information.
Implementations should:
- Use the provided
EmailParserto access email headers and content - Analyze the SMTP session, headers, DNS records, etc.
- Generate a response email with findings
- Queue the response for delivery
Thread safety: Each bot receives a cloned session and its own EmailParser instance.
File-backed messages use reference counting to ensure files are not deleted until all
consumers have finished processing.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the name of this bot for factory registration.voidprocess(Connection connection, EmailParser emailParser, String botAddress) Processes an email for bot analysis and generates a response.
-
Method Details
-
process
Processes an email for bot analysis and generates a response.This method is called from a dedicated bot thread pool.
Each bot receives its own
EmailParserinstance created from the message source, allowing safe concurrent access to the email content.- Parameters:
connection- SMTP connection instance containing cloned session data.emailParser- Parsed email instance (headers only). May be null if the message source is unavailable or parsing failed.botAddress- The bot address that matched (e.g., "robot+token@example.com").
-
getName
String getName()Gets the name of this bot for factory registration.- Returns:
- Bot name.
-