/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javax.management;
/**
* Represents the MBean server from the management point of view.
* The MBeanServerDelegate MBean emits the MBeanServerNotifications when
* an MBean is registered/unregistered in the MBean server.
*
* @since 1.5
*/
/** The MBean server agent identification.*/
/** The NotificationBroadcasterSupport object that sends the
notifications */
private final long stamp;
static {
};
notifsInfo[0] =
"javax.management.MBeanServerNotification",
"Notifications sent by the MBeanServerDelegate MBean");
}
/**
* Create a MBeanServerDelegate object.
*/
public MBeanServerDelegate () {
broadcaster = new NotificationBroadcasterSupport() ;
}
/**
* Returns the MBean server agent identity.
*
* @return the identity.
*/
if (mbeanServerId == null) {
try {
"using \"localhost\" instead. Cause is: "+e);
localHost = "localhost";
}
}
return mbeanServerId;
}
/**
* Returns the full name of the JMX specification implemented
* by this product.
*
* @return the specification name.
*/
return ServiceName.JMX_SPEC_NAME;
}
/**
* Returns the version of the JMX specification implemented
* by this product.
*
* @return the specification version.
*/
return ServiceName.JMX_SPEC_VERSION;
}
/**
* Returns the vendor of the JMX specification implemented
* by this product.
*
* @return the specification vendor.
*/
return ServiceName.JMX_SPEC_VENDOR;
}
/**
* Returns the JMX implementation name (the name of this product).
*
* @return the implementation name.
*/
return ServiceName.JMX_IMPL_NAME;
}
/**
* Returns the JMX implementation version (the version of this product).
*
* @return the implementation version.
*/
try {
} catch (SecurityException e) {
return "";
}
}
/**
* Returns the JMX implementation vendor (the vendor of this product).
*
* @return the implementation vendor.
*/
return ServiceName.JMX_IMPL_VENDOR;
}
// From NotificationEmitter extends NotificationBroacaster
//
final MBeanNotificationInfo[] infos =
new MBeanNotificationInfo[len];
return infos;
}
// From NotificationEmitter extends NotificationBroacaster
//
public synchronized
throws IllegalArgumentException {
}
// From NotificationEmitter extends NotificationBroacaster
//
public synchronized
throws ListenerNotFoundException {
}
// From NotificationEmitter extends NotificationBroacaster
//
public synchronized
throws ListenerNotFoundException {
}
/**
* Enables the MBean server to send a notification.
* If the passed <var>notification</var> has a sequence number lesser
* or equal to 0, then replace it with the delegate's own sequence
* number.
* @param notification The notification to send.
*
*/
synchronized (this) {
}
}
}
/**
* Defines the default ObjectName of the MBeanServerDelegate.
*
* @since 1.6
*/
/* Return a timestamp that is monotonically increasing even if
System.currentTimeMillis() isn't (for example, if you call this
constructor more than once in the same millisecond, or if the
clock always returns the same value). This means that the ids
for a given JVM will always be distinact, though there is no
such guarantee for two different JVMs. */
private static synchronized long getStamp() {
long s = System.currentTimeMillis();
if (oldStamp >= s) {
s = oldStamp + 1;
}
oldStamp = s;
return s;
}
}