Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » mq » il » http » [javadoc | source]
org.jboss.mq.il.http
public class: HTTPClientILService [javadoc | source]
java.lang.Object
   org.jboss.mq.il.http.HTTPClientILService

All Implemented Interfaces:
    Runnable, ClientILService

The HTTP/S implementation of the ClientILService object. One of these exists for each Connection object. Normally, this would be where you would boot up a client-side listener for the server to invoke. However in this case, we poll the server instead. In short, the ClientIL that we provide, once serialized and shipped to the server, simply places requests the server makes to it in a server-side storage mechanism. Then, when we send an HTTP request to the server, the servlet looks for queued requests waiting for us, batches them up and returns them in the response. Since we place ALL requests delivered to ANY instance of the ClientIL in a central storage queue, we have to have a way to get only the requests placed in storage by OUR ClientIL. Originally, I attempted to use the ConnectionId for this purpose, but it proooved to be less than ideal due to the fact that it created many cases where requests were being fielded to an instance of a ClientIL which was sent over the wire prior to the server returning our ConnectionId. This resulted in lost requests. Furthermore, since this had no control over exactly when the ConnectionId was set, we were forced to loop until it was not null. The current implementation doesn�t' suffer from these issues, as we can take full control over the process of setting our identifier and therefore, set the identifier on our ClientIL at creation time.
Constructor:
 public HTTPClientILService() 
Method from org.jboss.mq.il.http.HTTPClientILService Summary:
getClientIL,   init,   run,   start,   stop
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mq.il.http.HTTPClientILService Detail:
 public ClientIL getClientIL() throws Exception 
 public  void init(Connection connection,
    Properties props) throws Exception 
 public  void run() 
 public  void start() throws Exception 
 public  void stop() throws Exception