ome.formats.importer.util
Class HtmlMessenger

java.lang.Object
  extended by ome.formats.importer.util.HtmlMessenger

public class HtmlMessenger
extends Object

This class allows you to submit a URL and a String hash map of key-value pairs to be posted to the URL in question.

Author:
Brian W. Loranger

Constructor Summary
HtmlMessenger(String url, List<org.apache.commons.httpclient.methods.multipart.Part> postList)
          Instantiate html messenger
 
Method Summary
 String executePost()
          Execute a post action and retrieve server reply This method executes the post created when this class is instantiated
 org.apache.commons.httpclient.HttpClient getHttpClient()
           
 String login(String url, String username, String password)
          Login to website
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlMessenger

public HtmlMessenger(String url,
                     List<org.apache.commons.httpclient.methods.multipart.Part> postList)
              throws HtmlMessengerException
Instantiate html messenger

Parameters:
url -
postList - - variables list in post
Throws:
HtmlMessengerException
Method Detail

executePost

public String executePost()
                   throws HtmlMessengerException
Execute a post action and retrieve server reply This method executes the post created when this class is instantiated

Returns:
server reply
Throws:
HtmlMessengerException

getHttpClient

public org.apache.commons.httpclient.HttpClient getHttpClient()
Returns:
http client

login

public String login(String url,
                    String username,
                    String password)
             throws HtmlMessengerException
Login to website

Parameters:
url -
username -
password -
Returns:
Throws:
HtmlMessengerException


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.