Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.mq.il.http
Class HTTPClientILService

    java.lang.Object
      org.jboss.mq.il.http.HTTPClientILService

All Implemented Interfaces:
  ClientILService, Runnable

public class HTTPClientILService
extends Object
implements 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.

Version:
  $Revision: 1.4 $
Author:
  Nathan Phelps (nathan@jboss.org)

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

### HTTPClientILService

    public HTTPClientILService()

Method Detail

### getClientIL

    public ClientIL getClientIL()
                         throws Exception

  Description copied from interface: `ClientILService`
  After initialization, this method may be called to obtain a reference to a ClientIL object. This object will eventually be serialized and sent to the server so that he can invoke methods on connection it was initialized with.

  Specified by:
    `getClientIL` in interface `ClientILService`
  Returns:
    The ClientIL value
  Throws:
    `Exception` - Description of Exception

### init

    public void init(Connection connection,
                     Properties props)
              throws Exception

  Description copied from interface: `ClientILService`
  After construction, the ClientILService is initialized with a reference to the Connection object and the connection properties.

  Specified by:
    `init` in interface `ClientILService`
  Parameters:
    `connection` - Description of Parameter
    `props` - Description of Parameter
  Throws:
    `Exception` - Description of Exception

### start

    public void start()
               throws Exception

  Description copied from interface: `ClientILService`
  Once started, the ClientIL instance should process all server requests.

  Specified by:
    `start` in interface `ClientILService`
  Throws:
    `Exception` - Description of Exception

### stop

    public void stop()
              throws Exception

  Description copied from interface: `ClientILService`
  Once stopped, the ClientIL instance stop processing all server requests. if( cr_server != null ) cr_server.close(); if (cr!=null && cr instanceof java.rmi.Remote) { java.rmi.server.UnicastRemoteObject.unexportObject((java.rmi.Remote)cr, true); }

  Specified by:
    `stop` in interface `ClientILService`
  Throws:
    `Exception` - Description of Exception

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.