History | Log In     View a printable version of the current page. [image]  
Learn more about Quick Search
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
[image]Add the possibility to get cookies created by the server and to pass cookie to the amf connection. (BLZ-249)

[image][image] 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);
 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: [image]
There are no comments yet on this issue.


You are viewing a mobilized version of this site...
View original page here

How do you rate mobile version of this page?

Mobilized by Mowser Mowser