1 29 30 package com.caucho.server.resin; 31 32 import com.caucho.Version; 33 import com.caucho.management.server.AbstractManagedObject; 34 import com.caucho.management.server.ClusterMXBean; 35 import com.caucho.management.server.ResinMXBean; 36 import com.caucho.management.server.ServerMXBean; 37 import com.caucho.server.util.CauchoSystem; 38 import com.caucho.util.L10N; 39 40 public class ResinAdmin extends AbstractManagedObject 41 implements ResinMXBean 42 { 43 private static final L10N L = new L10N(ResinAdmin.class); 44 45 private static final String THREAD_POOL_OBJECT_NAME = "resin:type=ThreadPool"; 46 47 private final Resin _resin; 48 49 52 public ResinAdmin(Resin resin) 53 { 54 _resin = resin; 55 56 registerSelf(); 57 } 58 59 public String getName() 60 { 61 return null; 62 } 63 64 68 71 public ClusterMXBean []getClusters() 72 { 73 return _resin.getClusters(); 74 } 75 76 80 public String getConfigFile() 81 { 82 return _resin.getResinConf().getNativePath(); 83 } 84 85 public String getResinHome() 86 { 87 return _resin.getResinHome().getNativePath(); 88 } 89 90 public String getRootDirectory() 91 { 92 return _resin.getRootDirectory().getNativePath(); 93 } 94 95 public ServerMXBean getServer() 96 { 97 return _resin.getServer().getAdmin(); 98 } 99 100 public String getVersion() 101 { 102 return Version.FULL_VERSION; 103 } 104 105 public boolean isProfessional() 106 { 107 return _resin.isProfessional(); 108 } 109 110 public String getLocalHost() 111 { 112 return CauchoSystem.getLocalHost(); 113 } 114 115 public String toString() 116 { 117 return "ResinAdmin[" + getObjectName() + "]"; 118 } 119 } 120 | Popular Tags |