com.croftsoft.core.net.http.msg
Class HttpMessageClient
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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 Core Javadoc (2008-09-28 20:58:02)