History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: BLZ-250
Type: Patch Submission Patch Submission
Status: Patch Submitted Patch Submitted
Priority: None None
Assignee: Kumaran Nallore
Reporter: Rémi Flament
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
BlazeDS
Add the possibility to get cookies created by the server and to pass cookie to the amf connection. (BLZ-249)

HTTPCookieProcessor and setHTTPCookie() method

Created: 10/04/08 08:55 AM   Updated: 10/04/08 08:57 AM
Security Level: Public (All JIRA Users )

File Attachments: 1. Text File cookies.patch (2 kb)


Parent Component: Java AMF Client


 Description  « Hide
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);

 All   Comments      Sort Order:
There are no comments yet on this issue.