[jboss-jira] [JBoss JIRA] (AS7-2325) Get rid of reflection configuring the ProtocolHandler in WebConnectorService
Remy Maucherat (Commented) (JIRA)
jira-events at lists.jboss.org
Wed Oct 26 15:15:45 EDT 2011
[ https://issues.jboss.org/browse/AS7-2325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637750#comment-12637750 ]
Remy Maucherat commented on AS7-2325:
-------------------------------------
This is the same as for the SSL kludges, the native protocol handler does not have the same properties as the Java one. So ...
However, I can recode this using the concrete implementation classes (instanceof -> cast -> normal method invocation), if you like it better. I wanted to avoid that when I wrote this.
> Get rid of reflection configuring the ProtocolHandler in WebConnectorService
> ----------------------------------------------------------------------------
>
> Key: AS7-2325
> URL: https://issues.jboss.org/browse/AS7-2325
> Project: Application Server 7
> Issue Type: Feature Request
> Components: Web
> Reporter: Kabir Khan
> Assignee: Remy Maucherat
> Fix For: 7.1.0.CR1
>
>
> A lot of the set methods do
> {code}
> if (ssl.hasDefined(Constants.PASSWORD)) {
> Method m = connector.getProtocolHandler().getClass().getMethod("setSSLPassword", String.class);
> m.invoke(connector.getProtocolHandler(), ssl.get(Constants.PASSWORD).asString());
> }
> if (ssl.hasDefined(Constants.CERTIFICATE_KEY_FILE)) {
> Method m = connector.getProtocolHandler().getClass().getMethod("setSSLCertificateKeyFile", String.class);
> m.invoke(connector.getProtocolHandler(), ssl.get(Constants.CERTIFICATE_KEY_FILE).asString());
> }
> //etc.
> {code}
> The ProtocolHandler inteface does not expose them, so maybe they should go there or another common interface for configuring PH's
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list