00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 package org.objectweb.jonas.resource;
00030
00031 import java.util.Properties;
00032 import java.io.File;
00033 import java.net.URL;
00034
00044 public class JmxResourceAdapter implements JmxResourceAdapterMBean {
00045
00049 private Properties prop = null;
00053 private String jndiname = null;
00057 private String filename = null;
00061 private boolean inEarCase = false;
00065 private URL earURL = null;
00066
00075 public JmxResourceAdapter(Properties prop, String jndiname, String filename,
00076 boolean inEarCase, URL earURL) {
00077 this.prop = prop;
00078 this.jndiname = jndiname;
00079
00080 try {
00081 this.filename = (new File(filename)).toURL().getPath();
00082 } catch (Exception e) {
00083 this.filename = filename;
00084 }
00085 this.inEarCase = inEarCase;
00086 this.earURL = earURL;
00087 }
00088
00093 public Properties getProperties() {
00094 return prop;
00095 }
00096
00101 public String getJndiName() {
00102 return jndiname;
00103 }
00104
00109 public String getFilename() {
00110 return filename;
00111 }
00112
00117 public boolean isInEarCase() {
00118 return inEarCase;
00119 }
00120
00125 public URL getEarURL() {
00126 return earURL;
00127 }
00128 }