|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mq.il.http.HTTPClientILService
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锟絫' 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 Summary | |
HTTPClientILService()
|
Method Summary | |
ClientIL |
getClientIL()
After initialization, this method may be called to obtain a reference to a ClientIL object. |
void |
init(Connection connection,
Properties props)
After construction, the ClientILService is initialized with a reference to the Connection object and the connection properties. |
void |
run()
|
void |
start()
Once started, the ClientIL instance should process all server requests. |
void |
stop()
Once stopped, the ClientIL instance stop processing all server requests. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HTTPClientILService()
Method Detail |
public ClientIL getClientIL() throws Exception
ClientILService
getClientIL
in interface ClientILService
Exception
- Description of Exceptionpublic void init(Connection connection, Properties props) throws Exception
ClientILService
init
in interface ClientILService
connection
- Description of Parameterprops
- Description of Parameter
Exception
- Description of Exceptionpublic void start() throws Exception
ClientILService
start
in interface ClientILService
Exception
- Description of Exceptionpublic void stop() throws Exception
ClientILService
stop
in interface ClientILService
Exception
- Description of Exceptionpublic void run()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |