|
Java example source code file (JMXConnectorServerMBean.java)
The JMXConnectorServerMBean.java Java example source code/* * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * 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.remote; import java.io.IOException; import java.util.Map; /** * <p>MBean interface for connector servers. A JMX API connector server * is attached to an MBean server, and establishes connections to that * MBean server for remote clients.</p> * * <p>A newly-created connector server is inactive, and does * not yet listen for connections. Only when its {@link #start start} * method has been called does it start listening for connections.</p> * * @since 1.5 */ public interface JMXConnectorServerMBean { /** * <p>Activates the connector server, that is, starts listening for * client connections. Calling this method when the connector * server is already active has no effect. Calling this method * when the connector server has been stopped will generate an * {@link IOException}.</p> * * @exception IOException if it is not possible to start listening * or if the connector server has been stopped. * * @exception IllegalStateException if the connector server has * not been attached to an MBean server. */ public void start() throws IOException; /** * <p>Deactivates the connector server, that is, stops listening for * client connections. Calling this method will also close all * client connections that were made by this server. After this * method returns, whether normally or with an exception, the * connector server will not create any new client * connections.</p> * * <p>Once a connector server has been stopped, it cannot be started * again.</p> * * <p>Calling this method when the connector server has already * been stopped has no effect. Calling this method when the * connector server has not yet been started will disable the * connector server object permanently.</p> * * <p>If closing a client connection produces an exception, that * exception is not thrown from this method. A {@link * JMXConnectionNotification} with type {@link * JMXConnectionNotification#FAILED} is emitted from this MBean * with the connection ID of the connection that could not be * closed.</p> * * <p>Closing a connector server is a potentially slow operation. * For example, if a client machine with an open connection has * crashed, the close operation might have to wait for a network * protocol timeout. Callers that do not want to block in a close * operation should do it in a separate thread.</p> * * @exception IOException if the server cannot be closed cleanly. * When this exception is thrown, the server has already attempted * to close all client connections. All client connections are * closed except possibly those that generated exceptions when the * server attempted to close them. */ public void stop() throws IOException; /** * <p>Determines whether the connector server is active. A connector * server starts being active when its {@link #start start} method * returns successfully and remains active until either its * {@link #stop stop} method is called or the connector server * fails.</p> * * @return true if the connector server is active. */ public boolean isActive(); /** * <p>Inserts an object that intercepts requests for the MBean server * that arrive through this connector server. This object will be * supplied as the <code>MBeanServer for any new connection * created by this connector server. Existing connections are * unaffected.</p> * * <p>This method can be called more than once with different * {@link MBeanServerForwarder} objects. The result is a chain * of forwarders. The last forwarder added is the first in the chain. * In more detail:</p> * * <ul> * <li> Other Java examples (source code examples)Here is a short list of links related to this Java JMXConnectorServerMBean.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.