com.counterclaim.openefm.client
Class HttpContentClient

java.lang.Object
  extended bycom.counterclaim.openefm.client.HttpContentClient

public class HttpContentClient
extends java.lang.Object

 

Field Summary
private static org.apache.log4j.Logger log
           
 
Constructor Summary
HttpContentClient()
           
 
Method Summary
static void main(java.lang.String[] args)
          Testing driver.
 java.lang.String sendContent(java.lang.String host_ip, int port, java.lang.String path, java.lang.String content)
          This class sends the content string to a http server and captures the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Logger log
Constructor Detail

HttpContentClient

public HttpContentClient()
Method Detail

sendContent

public java.lang.String sendContent(java.lang.String host_ip,
                                    int port,
                                    java.lang.String path,
                                    java.lang.String content)
This class sends the content string to a http server and captures the response.

Parameters:
host_ip - The ip address of the http server to post to
port - The port the http server is running on, 80 normally
path - The path of the servlet / script to post to
content - The content to deliver
Returns:
The response from the post

main

public static void main(java.lang.String[] args)
Testing driver.

Note: for this to work, an insecure "portNumber" must be defined in "etc/config.xml" as 8080. This is not normally the case, since the admin interface is normally meant to be secure. But the HTTPClient library doesn't handle SSL (at least not out of the box), so this needs an insecure interface.



Copyright © 2002 counterclaim.com. All Rights Reserved.