public class SoapUIAMFConnection extends Object
Constructor and Description |
---|
SoapUIAMFConnection()
Creates a default AMF connection instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addAmfHeader(String name,
boolean mustUnderstand,
Object data)
Adds an AMF packet-level header which is sent with every request for the
life of this AMF connection.
|
void |
addAmfHeader(String name,
Object data)
Add an AMF packet-level header with mustUnderstand=false, which is sent
with every request for the life of this AMF connection.
|
void |
addHttpRequestHeader(String name,
String value)
Adds a Http request header to the underlying connection.
|
Object |
call(PropertyExpansionContext context,
String command,
Object... arguments)
Makes an AMF request to the server.
|
void |
close()
Closes the underlying URL connection, sets the url to null, and clears the
cookies.
|
void |
connect(String url)
Connects to the URL provided.
|
protected flex.messaging.io.amf.client.exceptions.ServerStatusException.HttpResponseInfo |
generateHttpResponseInfo()
Generates the HTTP response info for the server status exception.
|
int |
getObjectEncoding() |
protected String |
getResponseURI()
Generates and returns the response URI.
|
String |
getUrl() |
protected void |
internalConnect()
An internal method that sets up the underlying URL connection.
|
protected Object |
processAmfBody(ArrayList<flex.messaging.io.amf.MessageBody> messages)
Processes the AMF body.
|
protected void |
processAmfHeaders(ArrayList<flex.messaging.io.amf.MessageHeader> headers)
Processes the AMF headers by dispatching them to an AMF header processor,
if one exists.
|
protected Object |
processAmfPacket(flex.messaging.io.amf.ActionMessage packet)
Processes the AMF packet.
|
protected Object |
processHttpResponse(InputStream inputStream)
Processes the HTTP response headers and body.
|
protected Object |
processHttpResponseBody(InputStream inputStream)
Processes the HTTP response body.
|
static void |
registerAlias(String alias,
String className)
Registers a custom alias for a class name bidirectionally.
|
void |
removeAllAmfHeaders()
Removes all AMF headers.
|
void |
removeAllHttpRequestHeaders()
Removes all Http request headers.
|
boolean |
removeAmfHeader(String name)
Removes any AMF headers found with the name given.
|
boolean |
removeHttpRequestHeader(String name)
Removes the Http header found with the name given.
|
protected Object |
send(ByteArrayOutputStream outBuffer)
Writes the output buffer and processes the HTTP response.
|
protected void |
setHttpRequestHeaders()
Sets the Http request headers, including the cookie headers.
|
void |
setObjectEncoding(int objectEncoding) |
public SoapUIAMFConnection()
public int getObjectEncoding()
public void setObjectEncoding(int objectEncoding)
public String getUrl()
public void addAmfHeader(String name, boolean mustUnderstand, Object data)
name
- The name of the header.mustUnderstand
- Whether the header must be processed or not.data
- The value of the header.public void addAmfHeader(String name, Object data)
name
- The name of the header.data
- The value of the header.public boolean removeAmfHeader(String name)
name
- The name of the header(s) to remove.public void removeAllAmfHeaders()
public void addHttpRequestHeader(String name, String value)
name
- The name of the Http header.value
- The value of the Http header.public boolean removeHttpRequestHeader(String name)
name
- The name of the Http header.public void removeAllHttpRequestHeaders()
public Object call(PropertyExpansionContext context, String command, Object... arguments) throws flex.messaging.io.amf.client.exceptions.ClientStatusException, flex.messaging.io.amf.client.exceptions.ServerStatusException
command
- The method to call on the server.arguments
- Arguments for the method.flex.messaging.io.amf.client.exceptions.ClientStatusException
- If there is a client side exception.flex.messaging.io.amf.client.exceptions.ServerStatusException
- If there is a server side exception.public void close()
public void connect(String url) throws flex.messaging.io.amf.client.exceptions.ClientStatusException
url
- The url to connect to.flex.messaging.io.amf.client.exceptions.ClientStatusException
- If there is a client side exception.protected flex.messaging.io.amf.client.exceptions.ServerStatusException.HttpResponseInfo generateHttpResponseInfo()
protected String getResponseURI()
protected void internalConnect() throws IOException
IOException
- If an exception is encountered during URL connection setup.protected Object processHttpResponse(InputStream inputStream) throws ClassNotFoundException, IOException, flex.messaging.io.amf.client.exceptions.ClientStatusException, flex.messaging.io.amf.client.exceptions.ServerStatusException
ClassNotFoundException
IOException
flex.messaging.io.amf.client.exceptions.ClientStatusException
flex.messaging.io.amf.client.exceptions.ServerStatusException
protected Object processHttpResponseBody(InputStream inputStream) throws ClassNotFoundException, IOException, flex.messaging.io.amf.client.exceptions.ClientStatusException, flex.messaging.io.amf.client.exceptions.ServerStatusException
ClassNotFoundException
IOException
flex.messaging.io.amf.client.exceptions.ClientStatusException
flex.messaging.io.amf.client.exceptions.ServerStatusException
protected Object processAmfPacket(flex.messaging.io.amf.ActionMessage packet) throws flex.messaging.io.amf.client.exceptions.ClientStatusException, flex.messaging.io.amf.client.exceptions.ServerStatusException
flex.messaging.io.amf.client.exceptions.ClientStatusException
flex.messaging.io.amf.client.exceptions.ServerStatusException
protected void processAmfHeaders(ArrayList<flex.messaging.io.amf.MessageHeader> headers) throws flex.messaging.io.amf.client.exceptions.ClientStatusException
flex.messaging.io.amf.client.exceptions.ClientStatusException
protected Object processAmfBody(ArrayList<flex.messaging.io.amf.MessageBody> messages) throws flex.messaging.io.amf.client.exceptions.ServerStatusException
flex.messaging.io.amf.client.exceptions.ServerStatusException
protected Object send(ByteArrayOutputStream outBuffer) throws ClassNotFoundException, IOException, flex.messaging.io.amf.client.exceptions.ClientStatusException, flex.messaging.io.amf.client.exceptions.ServerStatusException
ClassNotFoundException
IOException
flex.messaging.io.amf.client.exceptions.ClientStatusException
flex.messaging.io.amf.client.exceptions.ServerStatusException
protected void setHttpRequestHeaders()
Copyright © 2019. All Rights Reserved.