List of usage examples for javax.management.openmbean SimpleType BOOLEAN
SimpleType BOOLEAN
To view the source code for javax.management.openmbean SimpleType BOOLEAN.
Click Source Link
SimpleType
instance describing values whose Java class name is java.lang.Boolean
. From source file:org.jolokia.converter.object.StringToOpenTypeConverterTest.java
@Test public void simpleType() { assertTrue(converter.canConvert(SimpleType.STRING)); assertEquals(converter.convertToObject(SimpleType.STRING, "bla"), "bla"); assertEquals(converter.convertToObject(SimpleType.BOOLEAN, "true"), true); assertEquals(converter.convertToObject(SimpleType.BOOLEAN, false), false); assertEquals(converter.convertToObject(SimpleType.DOUBLE, 4.52), 4.52); assertEquals(converter.convertToObject(SimpleType.DOUBLE, "4.52"), 4.52); assertEquals(converter.convertToObject(SimpleType.INTEGER, "9876"), 9876); }
From source file:org.alfresco.repo.security.authentication.ldap.Monitor.java
/** * test authenticate//from ww w.j a v a 2 s . co m * * @param userName String * @param credentials String * @throws AuthenticationException */ public CompositeData testAuthenticate(String userName, String credentials) { String stepKeys[] = { "id", "stepMessage", "success" }; String stepDescriptions[] = { "id", "stepMessage", "success" }; OpenType<?> stepTypes[] = { SimpleType.INTEGER, SimpleType.STRING, SimpleType.BOOLEAN }; try { String[] key = { "id" }; CompositeType sType = new CompositeType("Authentication Step", "Step", stepKeys, stepDescriptions, stepTypes); TabularType tType = new TabularType("Diagnostic", "Authentication Steps", sType, key); TabularData table = new TabularDataSupport(tType); String attributeKeys[] = { "authenticationMessage", "success", "diagnostic" }; String attributeDescriptions[] = { "authenticationMessage", "success", "diagnostic" }; OpenType<?> attributeTypes[] = { SimpleType.STRING, SimpleType.BOOLEAN, tType }; try { component.authenticate(userName, credentials.toCharArray()); CompositeType cType = new CompositeType("Authentication Result", "Result Success", attributeKeys, attributeDescriptions, attributeTypes); Map<String, Object> value = new HashMap<String, Object>(); value.put("authenticationMessage", "Test Passed"); value.put("success", true); value.put("diagnostic", table); CompositeDataSupport row = new CompositeDataSupport(cType, value); return row; } catch (AuthenticationException ae) { CompositeType cType = new CompositeType("Authentication Result", "Result Failed", attributeKeys, attributeDescriptions, attributeTypes); Map<String, Object> value = new HashMap<String, Object>(); value.put("authenticationMessage", ae.getMessage()); value.put("success", false); if (ae.getDiagnostic() != null) { int i = 0; for (AuthenticationStep step : ae.getDiagnostic().getSteps()) { Map<String, Object> x = new HashMap<String, Object>(); x.put("id", i++); x.put("stepMessage", step.getMessage()); x.put("success", step.isSuccess()); CompositeDataSupport row = new CompositeDataSupport(sType, x); table.put(row); } } value.put("diagnostic", table); CompositeDataSupport row = new CompositeDataSupport(cType, value); return row; } } catch (OpenDataException oe) { logger.error("", oe); return null; } }
From source file:org.eclipse.gyrex.monitoring.internal.mbeans.MetricSetMBean.java
private OpenType detectType(final Class type) { if ((Long.class == type) || (Long.TYPE == type)) { return SimpleType.LONG; } else if ((Integer.class == type) || (Integer.TYPE == type)) { return SimpleType.INTEGER; } else if ((Double.class == type) || (Double.TYPE == type)) { return SimpleType.DOUBLE; } else if ((Float.class == type) || (Float.TYPE == type)) { return SimpleType.FLOAT; } else if ((Byte.class == type) || (Byte.TYPE == type)) { return SimpleType.BYTE; } else if ((Short.class == type) || (Short.TYPE == type)) { return SimpleType.SHORT; } else if ((Boolean.class == type) || (Boolean.TYPE == type)) { return SimpleType.BOOLEAN; } else if (BigDecimal.class == type) { return SimpleType.BIGDECIMAL; } else if (BigInteger.class == type) { return SimpleType.BIGINTEGER; } else if ((Character.class == type) || (Character.TYPE == type)) { return SimpleType.CHARACTER; }/* ww w .j a va2 s . c o m*/ // last fallback to strings if (isConvertibleToString(type)) { return SimpleType.STRING; } // give up return null; }
From source file:com.adobe.acs.commons.oak.impl.EnsureOakIndexManagerImpl.java
/** * Method for displaying Ensure Oak Index state in in the MBean * * @return the Ensure Oak Index data in a Tabular Format for the MBean * @throws OpenDataException//from ww w . j av a2 s . com */ @Override @SuppressWarnings("squid:S1192") public final TabularData getEnsureOakIndexes() throws OpenDataException { final CompositeType configType = new CompositeType("Ensure Oak Index Configurations", "Ensure Oak Index Configurations", new String[] { "Ensure Definitions Path", "Oak Indexes Path", "Applied", "Immediate" }, new String[] { "Ensure Definitions Path", "Oak Indexes Path", "Applied", "Immediate" }, new OpenType[] { SimpleType.STRING, SimpleType.STRING, SimpleType.BOOLEAN, SimpleType.BOOLEAN }); final TabularDataSupport tabularData = new TabularDataSupport( new TabularType("Ensure Oak Index Configuration", "Ensure Oak Index Configuration", configType, new String[] { "Ensure Definitions Path", "Oak Indexes Path" })); for (final AppliableEnsureOakIndex index : this.ensureIndexes) { final Map<String, Object> data = new HashMap<String, Object>(); data.put("Ensure Definitions Path", index.getEnsureDefinitionsPath()); data.put("Oak Indexes Path", index.getOakIndexesPath()); data.put("Applied", index.isApplied()); data.put("Immediate", index.isImmediate()); tabularData.put(new CompositeDataSupport(configType, data)); } return tabularData; }
From source file:org.wso2.andes.server.information.management.QueueManagementInformationMBean.java
/*** * Virtual host information are needed in the constructor to evaluate user permissions for * queue management actions.(e.g. purge) * * @param vHostMBean Used to access the virtual host information * @throws NotCompliantMBeanException//from www . j a v a2 s. c om */ public QueueManagementInformationMBean(VirtualHostImpl.VirtualHostMBean vHostMBean) throws NotCompliantMBeanException, OpenDataException { super(QueueManagementInformation.class, QueueManagementInformation.TYPE); andesChannel = Andes.getInstance().createChannel(new FlowControlListener() { @Override public void block() { restoreBlockedByFlowControl = true; } @Override public void unblock() { restoreBlockedByFlowControl = false; } @Override public void disconnect() { // Do nothing. since its not applicable. } }); VirtualHost virtualHost = vHostMBean.getVirtualHost(); queueRegistry = virtualHost.getQueueRegistry(); disablePubAck = new DisablePubAckImpl(); _msgContentAttributeTypes[0] = SimpleType.STRING; // For message properties _msgContentAttributeTypes[1] = SimpleType.STRING; // For content type _msgContentAttributeTypes[2] = new ArrayType(1, SimpleType.STRING); // For message content _msgContentAttributeTypes[3] = SimpleType.STRING; // For JMS message id _msgContentAttributeTypes[4] = SimpleType.BOOLEAN; // For redelivered _msgContentAttributeTypes[5] = SimpleType.LONG; // For JMS timeStamp _msgContentAttributeTypes[6] = SimpleType.STRING; // For dlc message destination _msgContentAttributeTypes[7] = SimpleType.LONG; // For andes message metadata id _msgContentType = new CompositeType("Message Content", "Message content for queue browse", VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC .toArray(new String[VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.size()]), VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.toArray( new String[VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC.size()]), _msgContentAttributeTypes); lz4CompressionHelper = new LZ4CompressionHelper(); }
From source file:com.cyberway.issue.crawler.admin.CrawlJob.java
/** * Build up the MBean info for Heritrix main. * @return Return created mbean info instance. * @throws InitializationException /*from w w w. j av a 2s . co m*/ */ protected OpenMBeanInfoSupport buildMBeanInfo() throws InitializationException { // Start adding my attributes. List<OpenMBeanAttributeInfo> attributes = new ArrayList<OpenMBeanAttributeInfo>(); // Attributes. attributes.add(new OpenMBeanAttributeInfoSupport(NAME_ATTR, "Crawl job name", SimpleType.STRING, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(STATUS_ATTR, "Short basic status message", SimpleType.STRING, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(FRONTIER_SHORT_REPORT_ATTR, "Short frontier report", SimpleType.STRING, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(THREADS_SHORT_REPORT_ATTR, "Short threads report", SimpleType.STRING, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(UID_ATTR, "Crawl job UID", SimpleType.STRING, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(TOTAL_DATA_ATTR, "Total data received", SimpleType.LONG, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(CRAWL_TIME_ATTR, "Crawl time", SimpleType.LONG, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(CURRENT_DOC_RATE_ATTR, "Current crawling rate (Docs/sec)", SimpleType.DOUBLE, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(CURRENT_KB_RATE_ATTR, "Current crawling rate (Kb/sec)", SimpleType.LONG, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(THREAD_COUNT_ATTR, "Active thread count", SimpleType.INTEGER, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(DOC_RATE_ATTR, "Crawling rate (Docs/sec)", SimpleType.DOUBLE, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(KB_RATE_ATTR, "Current crawling rate (Kb/sec)", SimpleType.LONG, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(DOWNLOAD_COUNT_ATTR, "Count of downloaded documents", SimpleType.LONG, true, false, false)); attributes.add(new OpenMBeanAttributeInfoSupport(DISCOVERED_COUNT_ATTR, "Count of discovered documents", SimpleType.LONG, true, false, false)); // Add in the crawl order attributes. addCrawlOrderAttributes(this.getController().getOrder(), attributes); // Add the bdbje attributes. Convert to open mbean attributes. // First do bdbeje setup. Then add a subset of the bdbje attributes. // Keep around the list of names as a convenience for when it comes // time to test if attribute is supported. Environment env = this.controller.getBdbEnvironment(); try { this.bdbjeMBeanHelper = new JEMBeanHelper(env.getConfig(), env.getHome(), true); } catch (DatabaseException e) { e.printStackTrace(); InitializationException ie = new InitializationException(e.getMessage()); ie.setStackTrace(e.getStackTrace()); throw ie; } this.bdbjeAttributeNameList = Arrays.asList(new String[] { JEMBeanHelper.ATT_ENV_HOME, JEMBeanHelper.ATT_OPEN, JEMBeanHelper.ATT_IS_READ_ONLY, JEMBeanHelper.ATT_IS_TRANSACTIONAL, JEMBeanHelper.ATT_CACHE_SIZE, JEMBeanHelper.ATT_CACHE_PERCENT, JEMBeanHelper.ATT_LOCK_TIMEOUT, JEMBeanHelper.ATT_IS_SERIALIZABLE, JEMBeanHelper.ATT_SET_READ_ONLY, }); addBdbjeAttributes(attributes, this.bdbjeMBeanHelper.getAttributeList(env), this.bdbjeAttributeNameList); // Operations. List<OpenMBeanOperationInfo> operations = new ArrayList<OpenMBeanOperationInfo>(); OpenMBeanParameterInfo[] args = new OpenMBeanParameterInfoSupport[3]; args[0] = new OpenMBeanParameterInfoSupport("url", "URL to add to the frontier", SimpleType.STRING); args[1] = new OpenMBeanParameterInfoSupport("forceFetch", "True if URL is to be force fetched", SimpleType.BOOLEAN); args[2] = new OpenMBeanParameterInfoSupport("seed", "True if URL is a seed", SimpleType.BOOLEAN); operations.add(new OpenMBeanOperationInfoSupport(IMPORT_URI_OPER, "Add passed URL to the frontier", args, SimpleType.VOID, MBeanOperationInfo.ACTION)); args = new OpenMBeanParameterInfoSupport[4]; args[0] = new OpenMBeanParameterInfoSupport("pathOrUrl", "Path or URL to file of URLs", SimpleType.STRING); args[1] = new OpenMBeanParameterInfoSupport("style", "Format format:default|crawlLog|recoveryJournal", SimpleType.STRING); args[2] = new OpenMBeanParameterInfoSupport("forceFetch", "True if URLs are to be force fetched", SimpleType.BOOLEAN); args[3] = new OpenMBeanParameterInfoSupport("seed", "True if all content are seeds.", SimpleType.BOOLEAN); operations.add(new OpenMBeanOperationInfoSupport(IMPORT_URIS_OPER, "Add file of passed URLs to the frontier", args, SimpleType.STRING, MBeanOperationInfo.ACTION)); args = new OpenMBeanParameterInfoSupport[4]; args[0] = new OpenMBeanParameterInfoSupport("filename", "File to print to", SimpleType.STRING); args[1] = new OpenMBeanParameterInfoSupport("regexp", "Regular expression URLs must match", SimpleType.STRING); args[2] = new OpenMBeanParameterInfoSupport("numberOfMatches", "Maximum number of matches to return", SimpleType.INTEGER); args[3] = new OpenMBeanParameterInfoSupport("verbose", "Should they be verbose descriptions", SimpleType.BOOLEAN); operations.add(new OpenMBeanOperationInfoSupport(DUMP_URIS_OPER, "Dump pending URIs from frontier to a file", args, SimpleType.VOID, MBeanOperationInfo.ACTION)); operations.add(new OpenMBeanOperationInfoSupport(PAUSE_OPER, "Pause crawling (noop if already paused)", null, SimpleType.VOID, MBeanOperationInfo.ACTION)); operations.add(new OpenMBeanOperationInfoSupport(RESUME_OPER, "Resume crawling (noop if already resumed)", null, SimpleType.VOID, MBeanOperationInfo.ACTION)); args = new OpenMBeanParameterInfoSupport[1]; args[0] = new OpenMBeanParameterInfoSupport("name", "Name of report ('all', 'standard', etc.).", SimpleType.STRING); operations.add(new OpenMBeanOperationInfoSupport(FRONTIER_REPORT_OPER, "Full frontier report", args, SimpleType.STRING, MBeanOperationInfo.INFO)); operations.add(new OpenMBeanOperationInfoSupport(THREADS_REPORT_OPER, "Full thread report", null, SimpleType.STRING, MBeanOperationInfo.INFO)); operations.add(new OpenMBeanOperationInfoSupport(SEEDS_REPORT_OPER, "Seeds report", null, SimpleType.STRING, MBeanOperationInfo.INFO)); operations.add(new OpenMBeanOperationInfoSupport(PROGRESS_STATISTICS_OPER, "Progress statistics at time of invocation", null, SimpleType.STRING, MBeanOperationInfo.INFO)); operations.add(new OpenMBeanOperationInfoSupport(PROGRESS_STATISTICS_LEGEND_OPER, "Progress statistics legend", null, SimpleType.STRING, MBeanOperationInfo.INFO)); operations.add(new OpenMBeanOperationInfoSupport(CHECKPOINT_OPER, "Start a checkpoint", null, SimpleType.VOID, MBeanOperationInfo.ACTION)); // Add bdbje operations. Add subset only. Keep around the list so have // it to hand when figuring what operations are supported. Usual actual // Strings because not accessible from JEMBeanHelper. this.bdbjeOperationsNameList = Arrays.asList(new String[] { "cleanLog", "evictMemory", "checkpoint", "sync", "getEnvironmentStatsToString", "getLockStatsToString", "getDatabaseNames", OP_DB_STAT }); addBdbjeOperations(operations, this.bdbjeMBeanHelper.getOperationList(env), this.bdbjeOperationsNameList); // Register notifications List<MBeanNotificationInfo> notifications = new ArrayList<MBeanNotificationInfo>(); notifications.add(new MBeanNotificationInfo( new String[] { "crawlStarted", "crawlEnding", "crawlPaused", "crawlResuming", PROG_STATS }, this.getClass().getName() + ".notifications", "CrawlStatusListener events and progress statistics as " + "notifications")); MBeanNotificationInfo[] notificationsArray = new MBeanNotificationInfo[notifications.size()]; notifications.toArray(notificationsArray); // Build the info object. OpenMBeanAttributeInfoSupport[] attributesArray = new OpenMBeanAttributeInfoSupport[attributes.size()]; attributes.toArray(attributesArray); OpenMBeanOperationInfoSupport[] operationsArray = new OpenMBeanOperationInfoSupport[operations.size()]; operations.toArray(operationsArray); return new OpenMBeanInfoSupport(this.getClass().getName(), "Current Crawl Job as OpenMBean", attributesArray, new OpenMBeanConstructorInfoSupport[] {}, operationsArray, notificationsArray); }
From source file:com.cyberway.issue.crawler.Heritrix.java
/** * Build up the MBean info for Heritrix main. * @return Return created mbean info instance. *///from w w w. ja v a 2 s. c o m protected OpenMBeanInfoSupport buildMBeanInfo() { OpenMBeanAttributeInfoSupport[] attributes = new OpenMBeanAttributeInfoSupport[Heritrix.ATTRIBUTE_LIST .size()]; OpenMBeanConstructorInfoSupport[] constructors = new OpenMBeanConstructorInfoSupport[1]; OpenMBeanOperationInfoSupport[] operations = new OpenMBeanOperationInfoSupport[Heritrix.OPERATION_LIST .size()]; MBeanNotificationInfo[] notifications = new MBeanNotificationInfo[0]; // Attributes. attributes[0] = new OpenMBeanAttributeInfoSupport(Heritrix.STATUS_ATTR, "Short basic status message", SimpleType.STRING, true, false, false); // Attributes. attributes[1] = new OpenMBeanAttributeInfoSupport(Heritrix.VERSION_ATTR, "Heritrix version", SimpleType.STRING, true, false, false); // Attributes. attributes[2] = new OpenMBeanAttributeInfoSupport(Heritrix.ISRUNNING_ATTR, "Whether the crawler is running", SimpleType.BOOLEAN, true, false, false); // Attributes. attributes[3] = new OpenMBeanAttributeInfoSupport(Heritrix.ISCRAWLING_ATTR, "Whether the crawler is crawling", SimpleType.BOOLEAN, true, false, false); // Attributes. attributes[4] = new OpenMBeanAttributeInfoSupport(Heritrix.ALERTCOUNT_ATTR, "The number of alerts", SimpleType.INTEGER, true, false, false); // Attributes. attributes[5] = new OpenMBeanAttributeInfoSupport(Heritrix.NEWALERTCOUNT_ATTR, "The number of new alerts", SimpleType.INTEGER, true, false, false); // Attributes. attributes[6] = new OpenMBeanAttributeInfoSupport(Heritrix.CURRENTJOB_ATTR, "The name of the job currently being crawled", SimpleType.STRING, true, false, false); // Constructors. constructors[0] = new OpenMBeanConstructorInfoSupport("HeritrixOpenMBean", "Constructs Heritrix OpenMBean instance ", new OpenMBeanParameterInfoSupport[0]); // Operations. operations[0] = new OpenMBeanOperationInfoSupport(Heritrix.START_OPER, "Start Heritrix instance", null, SimpleType.VOID, MBeanOperationInfo.ACTION); operations[1] = new OpenMBeanOperationInfoSupport(Heritrix.STOP_OPER, "Stop Heritrix instance", null, SimpleType.VOID, MBeanOperationInfo.ACTION); OpenMBeanParameterInfo[] args = new OpenMBeanParameterInfoSupport[1]; args[0] = new OpenMBeanParameterInfoSupport("threadName", "Name of thread to send interrupt", SimpleType.STRING); operations[2] = new OpenMBeanOperationInfoSupport(Heritrix.INTERRUPT_OPER, "Send thread an interrupt " + "(Used debugging)", args, SimpleType.STRING, MBeanOperationInfo.ACTION_INFO); operations[3] = new OpenMBeanOperationInfoSupport(Heritrix.START_CRAWLING_OPER, "Set Heritrix instance " + "into crawling mode", null, SimpleType.VOID, MBeanOperationInfo.ACTION); operations[4] = new OpenMBeanOperationInfoSupport(Heritrix.STOP_CRAWLING_OPER, "Unset Heritrix instance " + " crawling mode", null, SimpleType.VOID, MBeanOperationInfo.ACTION); args = new OpenMBeanParameterInfoSupport[4]; args[0] = new OpenMBeanParameterInfoSupport("pathOrURL", "Path/URL to order or jar of order+seed", SimpleType.STRING); args[1] = new OpenMBeanParameterInfoSupport("name", "Basename for new job", SimpleType.STRING); args[2] = new OpenMBeanParameterInfoSupport("description", "Description to save with new job", SimpleType.STRING); args[3] = new OpenMBeanParameterInfoSupport("seeds", "Initial seed(s)", SimpleType.STRING); operations[5] = new OpenMBeanOperationInfoSupport(Heritrix.ADD_CRAWL_JOB_OPER, "Add new crawl job", args, SimpleType.STRING, MBeanOperationInfo.ACTION_INFO); args = new OpenMBeanParameterInfoSupport[4]; args[0] = new OpenMBeanParameterInfoSupport("uidOrName", "Job UID or profile name", SimpleType.STRING); args[1] = new OpenMBeanParameterInfoSupport("name", "Basename for new job", SimpleType.STRING); args[2] = new OpenMBeanParameterInfoSupport("description", "Description to save with new job", SimpleType.STRING); args[3] = new OpenMBeanParameterInfoSupport("seeds", "Initial seed(s)", SimpleType.STRING); operations[6] = new OpenMBeanOperationInfoSupport(Heritrix.ADD_CRAWL_JOB_BASEDON_OPER, "Add a new crawl job based on passed Job UID or profile", args, SimpleType.STRING, MBeanOperationInfo.ACTION_INFO); args = new OpenMBeanParameterInfoSupport[1]; args[0] = new OpenMBeanParameterInfoSupport("UID", "Job UID", SimpleType.STRING); operations[7] = new OpenMBeanOperationInfoSupport(DELETE_CRAWL_JOB_OPER, "Delete/stop this crawl job", args, SimpleType.VOID, MBeanOperationInfo.ACTION); args = new OpenMBeanParameterInfoSupport[1]; args[0] = new OpenMBeanParameterInfoSupport("index", "Zero-based index into array of alerts", SimpleType.INTEGER); operations[8] = new OpenMBeanOperationInfoSupport(Heritrix.ALERT_OPER, "Return alert at passed index", args, SimpleType.STRING, MBeanOperationInfo.ACTION_INFO); try { this.jobCompositeType = new CompositeType("job", "Job attributes", JOB_KEYS, new String[] { "Job unique ID", "Job name", "Job status" }, new OpenType[] { SimpleType.STRING, SimpleType.STRING, SimpleType.STRING }); this.jobsTabularType = new TabularType("jobs", "List of jobs", this.jobCompositeType, new String[] { "uid" }); } catch (OpenDataException e) { // This should never happen. throw new RuntimeException(e); } operations[9] = new OpenMBeanOperationInfoSupport(Heritrix.PENDING_JOBS_OPER, "List of pending jobs (or null if none)", null, this.jobsTabularType, MBeanOperationInfo.INFO); operations[10] = new OpenMBeanOperationInfoSupport(Heritrix.COMPLETED_JOBS_OPER, "List of completed jobs (or null if none)", null, this.jobsTabularType, MBeanOperationInfo.INFO); args = new OpenMBeanParameterInfoSupport[2]; args[0] = new OpenMBeanParameterInfoSupport("uid", "Job unique ID", SimpleType.STRING); args[1] = new OpenMBeanParameterInfoSupport("name", "Report name (e.g. crawl-report, etc.)", SimpleType.STRING); operations[11] = new OpenMBeanOperationInfoSupport(Heritrix.CRAWLEND_REPORT_OPER, "Return crawl-end report", args, SimpleType.STRING, MBeanOperationInfo.ACTION_INFO); operations[12] = new OpenMBeanOperationInfoSupport(Heritrix.SHUTDOWN_OPER, "Shutdown container", null, SimpleType.VOID, MBeanOperationInfo.ACTION); args = new OpenMBeanParameterInfoSupport[2]; args[0] = new OpenMBeanParameterInfoSupport("level", "Log level: e.g. SEVERE, WARNING, etc.", SimpleType.STRING); args[1] = new OpenMBeanParameterInfoSupport("message", "Log message", SimpleType.STRING); operations[13] = new OpenMBeanOperationInfoSupport(Heritrix.LOG_OPER, "Add a log message", args, SimpleType.VOID, MBeanOperationInfo.ACTION); operations[14] = new OpenMBeanOperationInfoSupport(Heritrix.DESTROY_OPER, "Destroy Heritrix instance", null, SimpleType.VOID, MBeanOperationInfo.ACTION); operations[15] = new OpenMBeanOperationInfoSupport(Heritrix.TERMINATE_CRAWL_JOB_OPER, "Returns false if no current job", null, SimpleType.BOOLEAN, MBeanOperationInfo.ACTION); operations[16] = new OpenMBeanOperationInfoSupport(Heritrix.REBIND_JNDI_OPER, "Rebinds this Heritrix with JNDI.", null, SimpleType.VOID, MBeanOperationInfo.ACTION); // Build the info object. return new OpenMBeanInfoSupport(this.getClass().getName(), "Heritrix Main OpenMBean", attributes, constructors, operations, notifications); }