KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > javax > management > remote > rmi > RMIJRMPNotificationsTest


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package test.javax.management.remote.rmi;
10
11 import java.net.MalformedURLException JavaDoc;
12 import java.util.HashMap JavaDoc;
13 import java.util.Map JavaDoc;
14 import javax.management.remote.JMXServiceURL JavaDoc;
15 import javax.naming.Context JavaDoc;
16
17 import test.javax.management.remote.JMXNotificationsTestCase;
18
19 /**
20  * @version $Revision: 1.3 $
21  */

22 public class RMIJRMPNotificationsTest extends JMXNotificationsTestCase
23 {
24    public RMIJRMPNotificationsTest(String JavaDoc s)
25    {
26       super(s);
27    }
28
29    public JMXServiceURL JavaDoc createJMXConnectorServerAddress() throws MalformedURLException JavaDoc
30    {
31       return new JMXServiceURL JavaDoc("rmi", "localhost", 0);
32    }
33
34    public Map JavaDoc getEnvironment()
35    {
36       HashMap JavaDoc env = new HashMap JavaDoc();
37       env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
38       env.put(Context.PROVIDER_URL, "rmi://localhost:1099");
39       return env;
40    }
41 }
42
Popular Tags