Author: ron.sigal(a)jboss.com
Date: 2008-08-06 02:24:54 -0400 (Wed, 06 Aug 2008)
New Revision: 4471
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java
Log:
JBREM-990: Added getResponseMessage().
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java 2008-08-06
06:24:20 UTC (rev 4470)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java 2008-08-06
06:24:54 UTC (rev 4471)
@@ -1488,6 +1488,31 @@
}
+ static public String getResponseMessage(final HttpURLConnection conn)
+ throws IOException
+ {
+ if (skipAccessControl)
+ {
+ return conn.getResponseMessage();
+ }
+
+ try
+ {
+ return (String) AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws IOException
+ {
+ return conn.getResponseMessage();
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (IOException) e.getCause();
+ }
+ }
+
+
static public Object callTransport(final RMIServerInvokerInf server, final Object
payload)
throws IOException
{
Show replies by date