ca.sqlpower.wabit.dao
Class HttpMessageSender<T>

java.lang.Object
  extended by ca.sqlpower.wabit.dao.HttpMessageSender<T>
Type Parameters:
T - An Object type that represents the content of the message
All Implemented Interfaces:
MessageSender<T>
Direct Known Subclasses:
JSONHttpMessageSender

public abstract class HttpMessageSender<T>
extends java.lang.Object
implements MessageSender<T>

An abstract MessageSender implementation that specifically transmits messages using the HTTP protocol.


Constructor Summary
HttpMessageSender(org.apache.http.client.HttpClient httpClient, WabitServerInfo serverInfo, java.lang.String wabitWorkspaceUUID)
          Creates an HttpMessagePasser configured to send HTTP requests according to the settings contained in the WabitServerInfo parameter.
 
Method Summary
protected  org.apache.http.client.HttpClient getHttpClient()
          Returns the HttpClient to be used to send HTTP requests
protected  WabitServerInfo getServerInfo()
          Returns a WabitServerInfo instance containing the connection information of the HTTP server that HTTP request will be sent to
protected  java.net.URI getServerURI()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.sqlpower.wabit.dao.MessageSender
clear, flush, send
 

Constructor Detail

HttpMessageSender

public HttpMessageSender(org.apache.http.client.HttpClient httpClient,
                         WabitServerInfo serverInfo,
                         java.lang.String wabitWorkspaceUUID)
Creates an HttpMessagePasser configured to send HTTP requests according to the settings contained in the WabitServerInfo parameter. All HTTP requests will be made regarding the WabitWorkspace with the given UUID.

Parameters:
serverInfo - A WabitServerInfo instance containing the connection information for the HTTP server that the HTTP requests will be sent to
wabitWorkspaceUUID - The UUID that identifies the WabitWorkspace that the HTTP requests will be referring to
Method Detail

getServerURI

protected java.net.URI getServerURI()
                             throws java.net.URISyntaxException
Throws:
java.net.URISyntaxException

getHttpClient

protected org.apache.http.client.HttpClient getHttpClient()
Returns the HttpClient to be used to send HTTP requests


getServerInfo

protected WabitServerInfo getServerInfo()
Returns a WabitServerInfo instance containing the connection information of the HTTP server that HTTP request will be sent to



Copyright © 2009. All Rights Reserved.