[ https://issues.apache.org/jira/browse/THRIFT-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ed Ceaser updated THRIFT-250: ----------------------------- Attachment: pluggable_executor.diff > ExecutorService as a constructor parameter for TServer > ------------------------------------------------------- > > Key: THRIFT-250 > URL: https://issues.apache.org/jira/browse/THRIFT-250 > Project: Thrift > Issue Type: Wish > Components: Java - Library > Environment: All > Reporter: Carl Brodeur > Priority: Minor > Attachments: pluggable_executor.patch > > > Add a constructor parameter to the TServer > class in order to pass a reference to an existing (and centrally managed) > ExecutorService. > Motivation: Allow a Java server program that manages a centralized > ExecutorService to use Thrift as a connector while retaining full control on > the creation and management of threads. > For instance, the JDK 1.6 HTTPServer class has a 'setExecutor' method (see > below) > ************************************************************************************************************************************ > public abstract void setExecutor(Executor executor) > sets this server's Executor object. An Executor must be established > before start() is called. All HTTP requests are handled in tasks given to the > executor. If this method is not called (before start()) or if it is called > with a null Executor, then a default implementation is used, which uses the > thread which was created by the start() method. > Parameters: > executor - the Executor to set, or null for default implementation > Throws: > IllegalStateException - if the server is already started > ***************************************************************************************************** -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.