com.croftsoft.core.net.http.msg
Class HttpMessageClient

java.lang.Object
  extended by com.croftsoft.core.net.http.msg.HttpMessageClient
All Implemented Interfaces:
Commissionable, Destroyable, Initializable, Lifecycle, Resumable, Startable, Stoppable

public final class HttpMessageClient
extends Object
implements Lifecycle

An HttpMessagePoller/Pusher facade.

Since:
2000-04-23
Version:
2003-06-12
Author:
David Wallace Croft

Constructor Summary
HttpMessageClient(URL url, String userAgent, Encoder encoder, Parser parser, String contentType, byte[] requestBytes, Consumer consumer)
          Convenience constructor method.
HttpMessageClient(URL url, String userAgent, Encoder encoder, Parser parser, String contentType, byte[] requestBytes, Consumer consumer, long pollingPeriodMin, long pollingPeriodMax, long pollingPeriodInit, double pollingPeriodMult, double pollingPeriodDivi, long pollingPeriodIncr)
          Main constructor method.
 
Method Summary
 boolean append(Object o)
           
 void destroy()
           
 Queue getIncomingQueue()
           
 Queue getOutgoingQueue()
           
 void init()
           
 Object poll()
           
 Object pull()
           
 void replace(Object o)
           
 void setRequestBytes(byte[] requestBytes)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpMessageClient

public HttpMessageClient(URL url,
                         String userAgent,
                         Encoder encoder,
                         Parser parser,
                         String contentType,
                         byte[] requestBytes,
                         Consumer consumer,
                         long pollingPeriodMin,
                         long pollingPeriodMax,
                         long pollingPeriodInit,
                         double pollingPeriodMult,
                         double pollingPeriodDivi,
                         long pollingPeriodIncr)
Main constructor method.

Parameters:
consumer - May be null.

HttpMessageClient

public HttpMessageClient(URL url,
                         String userAgent,
                         Encoder encoder,
                         Parser parser,
                         String contentType,
                         byte[] requestBytes,
                         Consumer consumer)
Convenience constructor method.

Method Detail

getIncomingQueue

public Queue getIncomingQueue()

getOutgoingQueue

public Queue getOutgoingQueue()

setRequestBytes

public void setRequestBytes(byte[] requestBytes)

init

public void init()
Specified by:
init in interface Initializable

start

public void start()
Specified by:
start in interface Startable

stop

public void stop()
Specified by:
stop in interface Stoppable

destroy

public void destroy()
Specified by:
destroy in interface Destroyable

append

public boolean append(Object o)

replace

public void replace(Object o)

poll

public Object poll()

pull

public Object pull()
            throws InterruptedException
Throws:
InterruptedException

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)