001: /*
002: * $Id: APIManagerMBean.java,v 1.10 2007/09/18 08:45:06 agoubard Exp $
003: *
004: * Copyright 2003-2007 Orange Nederland Breedband B.V.
005: * See the COPYRIGHT file for redistribution and use restrictions.
006: */
007: package org.xins.server;
008:
009: import java.io.IOException;
010:
011: import javax.management.openmbean.CompositeDataSupport;
012: import javax.management.openmbean.TabularDataSupport;
013:
014: /**
015: * Management bean for the API.
016: *
017: * @version $Revision: 1.10 $ $Date: 2007/09/18 08:45:06 $
018: * @author <a href="mailto:anthony.goubard@japplis.com">Anthony Goubard</a>
019: *
020: * @since XINS 1.5.0
021: */
022: public interface APIManagerMBean {
023:
024: /**
025: * Gets the version of the API.
026: *
027: * @return
028: * the version of the API running.
029: *
030: * @throws IOException
031: * if the connection to the MBean fails.
032: */
033: String getAPIVersion() throws IOException;
034:
035: /**
036: * Gets the version of XINS which is running this API.
037: *
038: * @return
039: * the version of XINS running the API.
040: *
041: * @throws IOException
042: * if the connection to the MBean fails.
043: */
044: String getXINSVersion() throws IOException;
045:
046: /**
047: * Gets the name of the API.
048: *
049: * @return
050: * the name the API.
051: *
052: * @throws IOException
053: * if the connection to the MBean fails.
054: */
055: String getAPIName() throws IOException;
056:
057: /**
058: * Gets the bootstrap properties.
059: *
060: * @return
061: * the bootstrap properties for this API.
062: *
063: * @throws IOException
064: * if the connection to the MBean fails.
065: */
066: CompositeDataSupport getBootstrapProperties() throws IOException;
067:
068: /**
069: * Gets the runtime properties.
070: *
071: * @return
072: * the runtime properties for this API.
073: *
074: * @throws IOException
075: * if the connection to the MBean fails.
076: */
077: CompositeDataSupport getRuntimeProperties() throws IOException;
078:
079: /**
080: * Gets the time at which the API was started.
081: *
082: * @return
083: * the time at which the API was started in the form YYYYMMDDThhmmssSSS+TZ.
084: *
085: * @throws IOException
086: * if the connection to the MBean fails.
087: */
088: String getStartupTime() throws IOException;
089:
090: /**
091: * Gets the list of the API functions.
092: *
093: * @return
094: * the list of the API function names.
095: *
096: * @throws IOException
097: * if the connection to the MBean fails.
098: */
099: public String[] getFunctionNames() throws IOException;
100:
101: /**
102: * Gets the statistics of the functions.
103: *
104: * @return
105: * the statistics of the functions.
106: *
107: * @throws IOException
108: * if the connection to the MBean fails.
109: */
110: public TabularDataSupport getStatistics() throws IOException;
111:
112: /**
113: * Executes the _NoOp meta function.
114: *
115: * @throws IOException
116: * if the connection to the MBean fails.
117: *
118: * @throws NoSuchFunctionException
119: * if the _noOp meta function is not found.
120: *
121: * @throws AccessDeniedException
122: * if the JMX client is not in the ACLs to execute the _noOp meta function.
123: */
124: void noOp() throws IOException, NoSuchFunctionException,
125: AccessDeniedException;
126:
127: /**
128: * Reloads the runtime properties if the file has changed.
129: *
130: * @throws IOException
131: * if the connection to the MBean fails.
132: *
133: * @throws NoSuchFunctionException
134: * if the _ReloadProperties meta function is not found.
135: *
136: * @throws AccessDeniedException
137: * if the JMX client is not in the ACLs to execute the _ReloadProperties meta function.
138: */
139: void reloadProperties() throws IOException,
140: NoSuchFunctionException, AccessDeniedException;
141: }
|