equal
deleted
inserted
replaced
18 * |
18 * |
19 * CDDL HEADER END |
19 * CDDL HEADER END |
20 */ |
20 */ |
21 |
21 |
22 /* |
22 /* |
23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
24 */ |
24 */ |
25 |
25 |
26 package org.opensolaris.os.rad.jmx; |
26 package org.opensolaris.os.rad.jmx; |
27 |
27 |
28 import java.io.File; |
28 import java.io.*; |
29 import java.io.IOException; |
|
30 import java.net.MalformedURLException; |
29 import java.net.MalformedURLException; |
31 import java.util.Map; |
30 import java.util.Map; |
32 import javax.management.remote.JMXServiceURL; |
31 import javax.management.remote.JMXServiceURL; |
33 import org.opensolaris.os.rad.Transport; |
32 import org.opensolaris.os.rad.*; |
34 import org.opensolaris.os.rad.UnixTransport; |
|
35 |
33 |
36 class RadJMXAFUnixConnector extends RadJMXConnector { |
34 class RadJMXAFUnixConnector extends RadJMXConnector { |
|
35 // |
|
36 // Private methods |
|
37 // |
37 |
38 |
38 private File path_; |
39 private File path_; |
|
40 |
|
41 // |
|
42 // Constructors |
|
43 // |
39 |
44 |
40 RadJMXAFUnixConnector(JMXServiceURL url, Map<String, ?> env) |
45 RadJMXAFUnixConnector(JMXServiceURL url, Map<String, ?> env) |
41 throws MalformedURLException { |
46 throws MalformedURLException { |
42 |
47 |
43 super(url, env); |
48 super(url, env); |
45 path_ = new File(url.getURLPath()); |
50 path_ = new File(url.getURLPath()); |
46 if (!path_.isAbsolute()) |
51 if (!path_.isAbsolute()) |
47 throw new MalformedURLException("Absolute path required"); |
52 throw new MalformedURLException("Absolute path required"); |
48 } |
53 } |
49 |
54 |
|
55 // |
|
56 // RadJMXConnector methods |
|
57 // |
|
58 |
50 @Override |
59 @Override |
51 Transport getTransport(Map<String, ?> env) throws IOException { |
60 Transport getTransport(Map<String, ?> env) throws IOException { |
52 return new UnixTransport(path_); |
61 return new UnixTransport(path_); |
53 } |
62 } |
54 } |
63 } |