[ https://issues.apache.org/jira/browse/JAMES-3705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17478543#comment-17478543 ]
Karsten Otto commented on JAMES-3705: ------------------------------------- My original intent was extensibility with minimal code change, hence just the lonely protected method. It still makes sense for this purpose, e.g. we hook up a custom monitoring solution that probably nobody else would be interested in. I agree that it also makes sense to improve James metrics for POP3. I can take a look at integrating MetricFactory, but this is a different scope and a bigger change. I would prefer to do this in a separate ticket. > Extensible POP3 handlers > ------------------------ > > Key: JAMES-3705 > URL: https://issues.apache.org/jira/browse/JAMES-3705 > Project: James Server > Issue Type: Improvement > Components: POP3Server > Affects Versions: master > Reporter: Karsten Otto > Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > I propose a minor refactoring of the POP3 {{{}RetrCmdHandler{}}}, retrieving > the message content in a separate protected method: > > {code:java} > protected InputStream getMessageContent(POP3Session session, MessageMetaData > data){code} > With this developers can more easily create custom variants of this command, > to access the session and message metadata, wrap the message stream to e.g. > gather transfer statistics and monitor ultimate success/failure. > Since the {{TopCmdHandler}} extends {{{}RetrCmdHandler{}}}, it can trivially > use this method as well for the same benefit. > -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org