Author: david.lloyd(a)jboss.com
Date: 2009-09-16 16:19:59 -0400 (Wed, 16 Sep 2009)
New Revision: 5503
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java
Log:
Add a factory method
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java 2009-09-16
18:51:55 UTC (rev 5502)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java 2009-09-16
20:19:59 UTC (rev 5503)
@@ -26,6 +26,9 @@
* A configuration for a service to be deployed into the endpoint.
*
* @apiviz.exclude
+ *
+ * @param <I> the request type
+ * @param <O> the reply type
*/
public final class LocalServiceConfiguration<I, O> {
private final ClientListener<I, O> clientListener;
@@ -49,6 +52,20 @@
}
/**
+ * Create a new instance.
+ *
+ * @param clientListener the client listener
+ * @param requestClass the request class
+ * @param replyClass the reply class
+ * @param <I> the request type
+ * @param <O> the reply type
+ * @return a new configuration instance
+ */
+ public static <I, O> LocalServiceConfiguration<I, O> create(final
ClientListener<I, O> clientListener, final Class<I> requestClass, final
Class<O> replyClass) {
+ return new LocalServiceConfiguration<I,O>(clientListener, requestClass,
replyClass);
+ }
+
+ /**
* Get the request listener for this service.
*
* @return the request listener
Show replies by date