Add subclass hook so it can customise request properties.

This commit is contained in:
Ben Alex 2005-01-06 20:32:36 +00:00
parent 443cd0794b
commit fd2cc5dbc7
1 changed files with 15 additions and 0 deletions

View File

@ -46,6 +46,19 @@ public class AuthenticationSimpleHttpInvokerRequestExecutor
//~ Methods ================================================================
/**
* Provided so subclasses can perform additional configuration if required
* (eg set additional request headers for non-security related information
* etc).
*
* @param con the HTTP connection to prepare
* @param contentLength the length of the content to send
*
* @throws IOException if thrown by HttpURLConnection methods
*/
protected void doPrepareConnection(HttpURLConnection con, int contentLength)
throws IOException {}
/**
* Called every time a HTTP invocation is made.
*
@ -108,5 +121,7 @@ public class AuthenticationSimpleHttpInvokerRequestExecutor
+ "; does not provide a SecureContext");
}
}
doPrepareConnection(con, contentLength);
}
}