openamf/src/java/org/openamf AdvancedGateway.java,1.29,1.30 DefaultGateway.java,1.57,1.58

Jason Calabrese <[email protected]> Thu, 24 Jun 2004 00:34:56 +0000
Newsgroups gmane.comp.java.openamf.cvs
Message-ID <[email protected]>
Update of /cvsroot/openamf/openamf/src/java/org/openamf
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11999/src/java/org/openamf

Modified Files:
	AdvancedGateway.java DefaultGateway.java 
Log Message:
added some javadoc comments

Index: DefaultGateway.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/DefaultGateway.java,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** DefaultGateway.java	10 Jun 2004 01:20:59 -0000	1.57
--- DefaultGateway.java	24 Jun 2004 00:34:53 -0000	1.58
***************
*** 35,39 ****
  
  /**
!  * @author Jason Calabrese <[email protected]>
   * @author Sean C. Sullivan
   * 
--- 35,44 ----
  
  /**
!  * This is the Default entry for all amf requests
!  * 
!  * When a request is recieved it will be deserialized, processed, and then the
!  * response wil be serialized and sent to the client.
!  * 
!  * @author <a href="mailto:[email protected]">Jason Calabrese </a>
   * @author Sean C. Sullivan
   * 
***************
*** 63,70 ****
  	
  	/**
! 	 * Process request
  	 *
- 	 * @param req
- 	 * @param resp
  	 * @throws ServletException
  	 * @throws IOException
--- 68,73 ----
  	
  	/**
! 	 * Main entry point for the servlet
  	 *
  	 * @throws ServletException
  	 * @throws IOException
***************
*** 116,119 ****
--- 119,127 ----
  	}
  
+ 	/**
+ 	 * Uses the AMFDeserializer to deserialize the request
+ 	 * 
+ 	 * @see org.openamf.io.AMFDeserializer
+ 	 */
  	protected AMFMessage deserializeAMFMessage(HttpServletRequest req)
  		throws IOException {
***************
*** 125,133 ****
  
  	/**
! 	 * Serialize response message
  	 *
! 	 * @param resp
! 	 * @param message
! 	 * @throws IOException
  	 */
  	protected void serializeAMFMessage(
--- 133,139 ----
  
  	/**
! 	 * Uses the AMFSerializer to serialize the request
  	 *
! 	 * @see org.openamf.io.AMFSerializer
  	 */
  	protected void serializeAMFMessage(
***************
*** 147,155 ****
  
  	/**
! 	 * Process message
! 	 *
! 	 * @param req
! 	 * @param message
! 	 * @return
  	 */
  	protected AMFMessage processMessage(
--- 153,158 ----
  
  	/**
! 	 * Iterates through the request message's bodies, invokes each body and
! 	 * then, builds a message to send as the results
  	 */
  	protected AMFMessage processMessage(
***************
*** 168,178 ****
  	}
  
- 	/**
- 	 * Invoke service
- 	 *
- 	 * @param req
- 	 * @param requestBody
- 	 * @return
- 	 */
  	private Object invokeBody(HttpServletRequest req, AMFBody requestBody) {
  		Object serviceResult = null;
--- 171,174 ----
***************
*** 198,208 ****
  
  
- 	/**
- 	 * Returns target
- 	 *
- 	 * @param requestBody request message body
- 	 * @param serviceResult response message
- 	 * @return
- 	 */
  	private String getTarget(AMFBody requestBody, Object serviceResult) {
  		String target = "/onResult";
--- 194,197 ----
***************
*** 214,221 ****
  
  	/**
! 	 * Pre invoke service
! 	 *
! 	 * @param httpServletRequest
! 	 * @param serviceInvoker
  	 * @throws ServiceInvocationException
  	 */
--- 203,209 ----
  
  	/**
! 	 * Called before a body is invoked, if the selected invoker is a persistant
! 	 * service it's persistent service object will be looked up in the session
! 	 * 
  	 * @throws ServiceInvocationException
  	 */
***************
*** 235,244 ****
  
  	/**
! 	 * Post invoke service
! 	 *
! 	 * @param httpServletRequest
! 	 * @param serviceInvoker
! 	 * @param serviceResult
! 	 * @return
  	 * @throws ServiceInvocationException
  	 */
--- 223,229 ----
  
  	/**
! 	 * Called after the body is invoked, if the selected invoker is a persistant
! 	 * service it's persistent service object will be stored in the session
! 	 * 
  	 * @throws ServiceInvocationException
  	 */
***************
*** 292,295 ****
--- 277,287 ----
  	}
  
+ 	/**
+ 	 * This method is used to find the correct invoker for the request. By
+ 	 * default it just iterates over the service invokers defined in
+ 	 * openamf-config.xml and calls it's supports method.
+ 	 * 
+ 	 * @see org.openamf.invoker.ServiceInvoker#supports(org.openamf.invoker.ServiceInvoker)
+ 	 */
  	protected ServiceInvoker getServiceInvoker(
  		AMFBody requestBody,
***************
*** 336,340 ****
  
  	/**
! 	 * Reloads OpenAMF COnfiguration
  	 *
  	 * @return
--- 328,332 ----
  
  	/**
! 	 * Loads/Reloads OpenAMF COnfiguration from the openamf-config.xml file
  	 *
  	 * @return

Index: AdvancedGateway.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/AdvancedGateway.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** AdvancedGateway.java	30 Nov 2003 06:26:09 -0000	1.29
--- AdvancedGateway.java	24 Jun 2004 00:34:53 -0000	1.30
***************
*** 29,34 ****
  import org.openamf.invoker.ServiceInvoker;
  
  /**
!  * @author Jason Calabrese <[email protected]>
   * @version $Revision$, $Date$
   */
--- 29,42 ----
  import org.openamf.invoker.ServiceInvoker;
  
+ 
  /**
!  * Extends the behavior of the DefaultGateway to allow more advanced
!  * configuration such as selecting the invoker, adding access control, storing
!  * state-beans in the request/session, and filtering the results.
!  * 
!  * For more information about the config options see the config-overview.txt
!  * file the docs directory
!  * 
!  * @author <a href="mailto:[email protected]">Jason Calabrese </a>
   * @version $Revision$, $Date$
   */
***************
*** 37,40 ****
--- 45,55 ----
  	private static Log log = LogFactory.getLog(AdvancedGateway.class);
  
+ 	/**
+ 	 * Uses the setting in openamf-config.xml to gets the correct invoker,
+ 	 * inforce access control, and store state-beans in the request/session
+ 	 * 
+ 	 * @see org.openamf.DefaultGateway#getServiceInvoker(org.openamf.AMFBody,
+ 	 *         javax.servlet.http.HttpServletRequest)
+ 	 */
  	protected ServiceInvoker getServiceInvoker(
  		AMFBody requestBody,
***************
*** 171,174 ****
--- 186,196 ----
  	}
  
+ 	/**
+ 	 * Preforms any filtering that was defined in openamd-config.xml and then
+ 	 * return control to the DefaultGateway
+ 	 * 
+ 	 * @see org.openamf.DefaultGateway#postInvokeService(javax.servlet.http.HttpServletRequest,
+ 	 *         org.openamf.invoker.ServiceInvoker, java.lang.Object)
+ 	 */
  	protected Object postInvokeService(
  		HttpServletRequest httpServletRequest,



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com