|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object EScidocBasicHandler
public class EScidocBasicHandler
Handler to create a connection with an eScidoc server
Field Summary | |
---|---|
private int |
eScidocPort
|
private java.lang.String |
eScidocServer
|
private java.lang.String |
eScidocUrl
|
private org.apache.http.impl.client.DefaultHttpClient |
httpclient
|
private java.lang.String |
password
|
private java.lang.String |
user
|
Constructor Summary | |
---|---|
EScidocBasicHandler(java.lang.String eScidocServer,
int eScidocPort,
java.lang.String user,
java.lang.String password)
|
Method Summary | |
---|---|
static java.lang.String |
convertStreamToString(java.io.InputStream is)
To convert the InputStream to String we use the BufferedReader.readLine() method. |
org.apache.http.HttpResponse |
eScidocGet(java.lang.String command)
Sends a GET request to the escidoc client. performs a login if not done before. |
org.apache.http.HttpResponse |
eScidocPost(java.lang.String command,
java.io.InputStream body)
Sends a POST request to the escidoc client. performs a login if not done before. |
org.apache.http.HttpResponse |
eScidocPut(java.lang.String command,
java.io.InputStream body)
Sends a PUT request to the escidoc client. performs a login if not done before. |
private org.apache.http.HttpResponse |
eScidocRequestBase(org.apache.http.client.methods.HttpRequestBase httpBase,
java.lang.String command,
java.io.InputStream body)
Generates and sends a general request to escidoc, used by escidocPUT, POST and GET. |
org.apache.http.impl.client.DefaultHttpClient |
login()
Logs you into escidoc and sets the httpclient field to the current client for this session |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String eScidocServer
private int eScidocPort
private java.lang.String user
private java.lang.String password
private java.lang.String eScidocUrl
private org.apache.http.impl.client.DefaultHttpClient httpclient
Constructor Detail |
---|
public EScidocBasicHandler(java.lang.String eScidocServer, int eScidocPort, java.lang.String user, java.lang.String password)
eScidocServer
- eScidocPort
- user
- password
- Method Detail |
---|
public org.apache.http.impl.client.DefaultHttpClient login() throws org.apache.http.client.ClientProtocolException, java.io.IOException
org.apache.http.client.ClientProtocolException
java.io.IOException
public org.apache.http.HttpResponse eScidocPut(java.lang.String command, java.io.InputStream body) throws org.apache.http.client.ClientProtocolException, java.io.IOException
command
- body
-
org.apache.http.client.ClientProtocolException
java.io.IOException
public org.apache.http.HttpResponse eScidocPost(java.lang.String command, java.io.InputStream body) throws org.apache.http.client.ClientProtocolException, java.io.IOException
command
- body
-
org.apache.http.client.ClientProtocolException
java.io.IOException
public org.apache.http.HttpResponse eScidocGet(java.lang.String command) throws org.apache.http.client.ClientProtocolException, java.io.IOException
command
-
org.apache.http.client.ClientProtocolException
java.io.IOException
private org.apache.http.HttpResponse eScidocRequestBase(org.apache.http.client.methods.HttpRequestBase httpBase, java.lang.String command, java.io.InputStream body) throws org.apache.http.client.ClientProtocolException, java.io.IOException
httpBase
- command
- body
-
org.apache.http.client.ClientProtocolException
java.io.IOException
public static java.lang.String convertStreamToString(java.io.InputStream is)
is
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |