

|
Valid XHTML v1.0
Author Profile
Top Authors
Log In to set widget preferences
| Author | # |
|---|---|
|
185 |
|
148 |
Anonymous User
|
49 |
|
28 |
Kimberly Hieber
|
27 |
|
23 |
Note: some conversations may be proxied or secured, thereby causing # differences
Subscribe
Partners
Recent
Tags
Log In to set widget preferences
Recent
Log In to set widget preferences
Most Active
Log In to set widget preferences
Popular
Log In to set widget preferences
|
|
nGenera Reference Architecture Java Toolkit
belongs to Java Toolkit Info ![]() by Marc S. Schriftman on 2008-02-13 05:09 AM read 646 times |
The nGenera Toolkit for Java can be accessed here.
The toolkit consists of a number of classes that help the developer access the platform, as well as a Servlet that can be extended to automatically authenticate within the nGenera services ecosystem.
Instructions for use:
1. Extend BaseAuthenticatedServlet:
public class SampleServiceServlet extends BaseAuthenticatedServlet {
2. BaseAuthenticatedServlet uses reflection to dynamically route RESTful calls to methods within your Servlet. As long as you obey the conventions, there will be no extra configuration required.
Example 1:
http://path.to.servlet/myresource/param1/param2
maps to:
get_myresource(HttpServletRequest, HttpServletResponse, String, String)
Example 2:
http://path.to.servlet/xxx/anotherresource/
maps to:
get_anotherresource(HttpServletRequest, HttpServletResponse)
Example 3 - if you wish to post to your servlet:
http://path.to.servlet/oldresource
maps to:
post_oldresource(HttpServletRequest, HttpServletResponse)
Because the reference architecture dictates that a GET to the Base URL of your service should return the API, BaseAuthenticatedServlet provides a default resource in the case where none is included in the URL. This method should be extended to return a human-readable copy of the API for your service.
Example 4:
http://path.to.servlet/
maps to:
get_description(HttpServletRequest, HttpServletResponse)
1 Reply
|
Log In to Reply |
Log In to Copy |
Tell a Friend
|
Trackback URL: http://www.kalivo.com/trackback/856-ngenera-reference-architecture-java-toolkit
|
|
Constructor and Return types
by Alan Savoy on 2008-02-21 08:04 PM read 163 times |
So does this mechanism assume a public constructor with no parameters?
public myClassName()
Also, what is the return type of the methods that will accept RESTful calls?
Would it be:
public void get_myresource(HttpServletRequest request, HttpServletResponse response, String parm1, String parm2)
Thanks for making this so easy!
No current tags
Log In to Reply | Log In to Copy | Tell a Friend |
Trackback URL: http://www.kalivo.com/trackback/875-constructor-and-return-types
