mx4j/src/tools/mx4j/tools/remote/provider/hessian ClientProvider.java,1.4,1.5 ServerProvider.java,1.4,1.5
Simone Bordet <[email protected]> Fri, 18 Feb 2005 15:23:12 +0000
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/provider/hessian
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25782/src/tools/mx4j/tools/remote/provider/hessian
Modified Files:
ClientProvider.java ServerProvider.java
Log Message:
Checking that providers, when called to create a JMXConnector[Server], are creating one corresponding to the JMXServiceURL passed in.
Index: ClientProvider.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/provider/hessian/ClientProvider.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ClientProvider.java 16 Feb 2005 15:28:40 -0000 1.4
--- ClientProvider.java 18 Feb 2005 15:23:10 -0000 1.5
***************
*** 10,13 ****
--- 10,14 ----
import java.io.IOException;
+ import java.net.MalformedURLException;
import java.util.Map;
***************
*** 25,28 ****
--- 26,31 ----
public JMXConnector newJMXConnector(JMXServiceURL url, Map environment) throws IOException
{
+ String protocol = url.getProtocol();
+ if (!"hessian".equals(protocol)) throw new MalformedURLException("Wrong protocol " + protocol + " for provider " + this);
return new HTTPConnector(url, environment);
}
Index: ServerProvider.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/tools/mx4j/tools/remote/provider/hessian/ServerProvider.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ServerProvider.java 16 Feb 2005 15:28:40 -0000 1.4
--- ServerProvider.java 18 Feb 2005 15:23:10 -0000 1.5
***************
*** 10,13 ****
--- 10,14 ----
import java.io.IOException;
+ import java.net.MalformedURLException;
import java.util.Map;
***************
*** 26,29 ****
--- 27,32 ----
public JMXConnectorServer newJMXConnectorServer(JMXServiceURL url, Map environment, MBeanServer server) throws IOException
{
+ String protocol = url.getProtocol();
+ if (!"hessian".equals(protocol)) throw new MalformedURLException("Wrong protocol " + protocol + " for provider " + this);
return new HTTPConnectorServer(url, environment, server);
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click