public class SessionImpl extends java.lang.Object implements Session
| Modifier and Type | Field and Description |
|---|---|
protected Authentication |
authentication |
protected Callback |
callback |
protected int |
connectionTimeout |
static int |
DEFAULT_CONNECTION_TIMEOUT |
protected java.util.Map<java.lang.String,java.lang.String> |
headers |
protected java.lang.String |
server |
| Constructor and Description |
|---|
SessionImpl(Session session) |
SessionImpl(java.lang.String server) |
SessionImpl(java.lang.String server,
Authentication authentication) |
SessionImpl(java.lang.String server,
Authentication authentication,
Callback callback) |
SessionImpl(java.lang.String server,
Authentication authentication,
int connectionTimeout,
Callback callback) |
SessionImpl(java.lang.String server,
Callback callback) |
| Modifier and Type | Method and Description |
|---|---|
Authentication |
getAuthentication() |
Callback |
getCallback() |
int |
getConnectionTimeout() |
java.util.Map<java.lang.String,java.lang.String> |
getHeaders() |
java.lang.String |
getServer() |
protected boolean |
hasUploadData(org.json.JSONObject command) |
org.json.JSONArray |
invoke(org.json.JSONObject command) |
void |
setAuthentication(Authentication authentication) |
void |
setCallback(Callback callback) |
void |
setConnectionTimeout(int connectionTimeout) |
void |
setHeaders(java.util.Map<java.lang.String,java.lang.String> headers) |
void |
setServer(java.lang.String server) |
org.json.JSONArray |
upload(org.json.JSONObject command) |
org.json.JSONArray |
upload(org.json.JSONObject command,
java.util.List<Protocol> protocols) |
public static final int DEFAULT_CONNECTION_TIMEOUT
protected Authentication authentication
protected Callback callback
protected int connectionTimeout
protected java.util.Map<java.lang.String,java.lang.String> headers
protected java.lang.String server
public SessionImpl(Session session)
public SessionImpl(java.lang.String server)
public SessionImpl(java.lang.String server,
Authentication authentication)
public SessionImpl(java.lang.String server,
Authentication authentication,
Callback callback)
public SessionImpl(java.lang.String server,
Authentication authentication,
int connectionTimeout,
Callback callback)
public SessionImpl(java.lang.String server,
Callback callback)
public Authentication getAuthentication()
getAuthentication in interface Sessionpublic Callback getCallback()
getCallback in interface Sessionpublic int getConnectionTimeout()
getConnectionTimeout in interface Sessionpublic java.util.Map<java.lang.String,java.lang.String> getHeaders()
getHeaders in interface Sessionpublic org.json.JSONArray invoke(org.json.JSONObject command)
throws java.lang.Exception
public void setAuthentication(Authentication authentication)
setAuthentication in interface Sessionpublic void setCallback(Callback callback)
setCallback in interface Sessionpublic void setConnectionTimeout(int connectionTimeout)
setConnectionTimeout in interface Sessionpublic void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
setHeaders in interface Sessionpublic void setServer(java.lang.String server)
public org.json.JSONArray upload(org.json.JSONObject command)
throws java.lang.Exception
public org.json.JSONArray upload(org.json.JSONObject command,
java.util.List<Protocol> protocols)
throws java.lang.Exception
protected boolean hasUploadData(org.json.JSONObject command)
throws org.json.JSONException
org.json.JSONException