Package ome.formats.importer.util
Class HtmlMessenger
- java.lang.Object
- 
- ome.formats.importer.util.HtmlMessenger
 
- 
 public class HtmlMessenger extends java.lang.ObjectThis class allows you to submit a URL and a String hash map of key-value pairs to be posted to the URL in question.
- 
- 
Constructor SummaryConstructors Constructor Description HtmlMessenger(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> postList)Instantiate messenger
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringexecutePost()Execute a post action and retrieve server reply This method executes the post created when this class is instantiatedorg.apache.http.impl.client.CloseableHttpClientgetCommunicationLink(java.lang.String url)Creates a client to communicate.
 
- 
- 
- 
Constructor Detail- 
HtmlMessengerpublic HtmlMessenger(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> postList) throws HtmlMessengerExceptionInstantiate messenger- Parameters:
- url- the HTTP POST URL
- postList- variables list in post
- Throws:
- HtmlMessengerException- if the POST failed
 
 
- 
 - 
Method Detail- 
getCommunicationLinkpublic org.apache.http.impl.client.CloseableHttpClient getCommunicationLink(java.lang.String url) throws HtmlMessengerExceptionCreates a client to communicate.- Parameters:
- url- get a HTTP client connection
- Returns:
- if the connection is encrypted
- Throws:
- HtmlMessengerException- if connection to the URL failed
 
 - 
executePostpublic java.lang.String executePost() throws HtmlMessengerExceptionExecute a post action and retrieve server reply This method executes the post created when this class is instantiated- Returns:
- server reply
- Throws:
- HtmlMessengerException- if the HTTP POST failed
 
 
- 
 
-