Security Level: Public (All JIRA Users )
Parent Component: Java AMF Client
This patch adds an interface called HTTPCookieProcessor. If there is a HTTPCookieProcessor set then amf connection calls it each time there is a cookie in the http response.
Then you can call the method AMFConnection.setCookie(String name, String value) to pass an input cookie to the underlying http connection.
Example of usage :
------------------------------------------------------------------------------------------------------------------------------
AMFConnection connection = new AMFConnection();
connection.setCookieProcessor(new HTTPCookieProcessor() {
public void processHTTPCookie(String cookieName, String cookieValue) {
System.out.println("[Cookie] " + cookieName + " : " + cookieValue);
}
});
connection.connect("http://xxxxxx/messagebroker/amf");
Object o = connection.call("myService.hashCode", new Object[0]);
------------------------------------------------------------------------------------------------------------------------------
Each time a cookie will be sent back by the server the cookie processor will print it.
So you can easily write a processor that stores cookies like JSESSIONID somewhere and then give it back by calling :
connection.setHTTPCookie("JSESSIONID", value);
Description
This patch adds an interface called HTTPCookieProcessor. If there is a HTTPCookieProcessor set then amf connection calls it each time there is a cookie in the http response. Then you can call the method AMFConnection.setCookie(String name, String value) to pass an input cookie to the underlying http connection. Example of usage : ------------------------------------------------------------------------------------------------------------------------------ AMFConnection connection = new AMFConnection(); connection.setCookieProcessor(new HTTPCookieProcessor() { public void processHTTPCookie(String cookieName, String cookieValue) { System.out.println("[Cookie] " + cookieName + " : " + cookieValue); } }); connection.connect("http://xxxxxx/messagebroker/amf"); Object o = connection.call("myService.hashCode", new Object[0]); ------------------------------------------------------------------------------------------------------------------------------ Each time a cookie will be sent back by the server the cookie processor will print it. So you can easily write a processor that stores cookies like JSESSIONID somewhere and then give it back by calling : connection.setHTTPCookie("JSESSIONID", value);
Show »
All Comments Sort Order: ![Ascending order - Click to sort in descending order [image]](http://mowser.com/img?url=http%3A%2F%2Fbugs.adobe.com%2Fjira%2Fimages%2Ficons%2Fdown.gif)
There are no comments yet on this issue.