public class HttpROPConnector extends Object implements ROPConnector
Modifier and Type | Field and Description |
---|---|
static String |
SESSION_COOKIE_NAME |
Constructor and Description |
---|
HttpROPConnector(String url,
String username,
String password) |
Modifier and Type | Method and Description |
---|---|
protected void |
addAuthHeader(URLConnection connection) |
protected void |
addSessionCookie(URLConnection connection) |
void |
close()
Close all resources related to ROP Connector.
|
protected InputStream |
doRequest(byte[] data) |
protected InputStream |
doRequest(Map<String,String> params) |
InputStream |
establishSession()
Establishes a dedicated session with Cayenne DataChannel, returning session id.
|
InputStream |
establishSharedSession(String sharedSessionName)
Creates a new session with the specified or joins an existing one.
|
InputStream |
sendMessage(byte[] message)
Processes message on a remote server, returning the result of such processing.
|
void |
setClientConnection(HttpClientConnection clientConnection) |
void |
setReadTimeout(Long readTimeout) |
public static final String SESSION_COOKIE_NAME
public void setClientConnection(HttpClientConnection clientConnection)
public void setReadTimeout(Long readTimeout)
public InputStream establishSession() throws IOException
ROPConnector
establishSession
in interface ROPConnector
IOException
public InputStream establishSharedSession(String sharedSessionName) throws IOException
ROPConnector
establishSharedSession
in interface ROPConnector
IOException
public InputStream sendMessage(byte[] message) throws IOException
ROPConnector
sendMessage
in interface ROPConnector
IOException
public void close() throws IOException
ROPConnector
close
in interface ROPConnector
IOException
protected InputStream doRequest(Map<String,String> params) throws IOException
IOException
protected InputStream doRequest(byte[] data) throws IOException
IOException
protected void addAuthHeader(URLConnection connection)
protected void addSessionCookie(URLConnection connection)
Copyright © 2001–2019 Apache Cayenne. All rights reserved.