javax.management.remote

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » management » javax.management.remote 
javax.management.remote
JMX<sup><font size="-2">TM</font></sup> Remote API.

Interfaces for remote access to JMX MBean servers. This package defines the essential interfaces for making a JMX MBean server manageable remotely. The specification of this functionality is completed by Part III of the JMX Specification, version 1.4 PDF document.

The JMX specification defines the notion of connectors. A connector is attached to a JMX API MBean server and makes it accessible to remote Java clients. The client end of a connector exports essentially the same interface as the MBean server, specifically the {@link javax.management.MBeanServerConnection MBeanServerConnection} interface.

A connector makes an MBean server remotely accessible through a given protocol. The JMX Remote API allows the use of different type of connectors:

  • The JMX Remote API defines a standard connector, the RMI Connector, which provides remote access to an MBeanServer through RMI.
  • The JMX Remote API also defines an optional connector called JMXMP Connector implementing the JMX Message Protocol (JMXMP). As it is optional, it is not part of this bundle (see note below).
  • User-defined connector protocols are also possible using the {@link javax.management.remote.JMXConnectorFactory JMXConnectorFactory} and, optionally, the Generic Connector (not part of this bundle, see note below).

Note: the optional packages implementing the optional part of the JMX Remote API are not included in the Java SE Platform but are available from the JMX Remote API Reference Implementation.

Connector addresses

Typically, a connector server has an address, represented by the class {@link javax.management.remote.JMXServiceURL JMXServiceURL}. An address for the RMI Connector can look like this:

      service:jmx:rmi:///jndi/rmi://myhost:1099/myname
      

In this JMXServiceURL, the first rmi: specifies the RMI connector, while the second rmi: specifies the RMI registry into which the RMI connector server has stored its stub.

The example above shows only one form of address. An address for the RMI Connector can take several forms, as detailed in the documentation for the package {@link javax.management.remote.rmi}.

Creating a connector server

A connector server is created by constructing an instance of a subclass of {@link javax.management.remote.JMXConnectorServer JMXConnectorServer}. Usually, this instance is created using the method {@link javax.management.remote.JMXConnectorServerFactory#newJMXConnectorServer(JMXServiceURL, java.util.Map, javax.management.MBeanServer) JMXConnectorServerFactory.newJMXConnectorServer}.

Typically, a connector server is associated with an MBean server either by registering it in that MBean server, or by supplying the MBean server as a parameter when creating the connector server.

Creating a connector client

A connector client is usually created by supplying the JMXServiceURL of the connector server to connect to to the {@link javax.management.remote.JMXConnectorFactory#connect(JMXServiceURL) JMXConnectorFactory.connect} method.

For more specialized uses, a connector client can be created by directly instantiating a class that implements the {@link javax.management.remote.JMXConnector JMXConnector} interface, for example the class {@link javax.management.remote.rmi.RMIConnector RMIConnector}.

Additional client or server parameters

When creating a connector client or server, it is possible to supply an object of type {@link java.util.Map Map} that defines additional parameters. Each entry in this Map has a key that is a string and an associated value whose type is appropriate for that key. The standard keys defined by the JMX Remote API all begin with the string "jmx.remote.". The document JMX Remote API lists these standard keys.

Connection identifiers

Every connection opened by a connector server has a string identifier, called its connection id. This identifier appears in the {@link javax.management.remote.JMXConnectionNotification JMXConnectionNotification} events emitted by the connector server, in the list returned by {@link javax.management.remote.JMXConnectorServerMBean#getConnectionIds() getConnectionIds()}, and in the value returned by the client's {@link javax.management.remote.JMXConnector#getConnectionId() getConnectionId()} method.

As an example, a connection ID can look something like this:

rmi://192.18.1.9 username 1
      

The formal grammar for connection ids that follow this convention is as follows (using the grammar notation from The Java Language Specification, Second Edition):

ConnectionId:
    Protocol : ClientAddressopt Space ClientIdopt Space ArbitraryText

ClientAddress:
    // HostAddress ClientPortopt

ClientPort
    : HostPort
      

The Protocol is a protocol that would be recognized by {@link javax.management.remote.JMXConnectorFactory JMXConnectorFactory}.

The ClientAddress is the address and port of the connecting client, if these can be determined, otherwise nothing. The HostAddress is the Internet address of the host that the client is connecting from, in numeric or DNS form. Numeric IPv6 addresses are enclosed in square brackets []. The HostPort is the decimal port number that the client is connecting from.

The ClientId is the identity of the client entity, typically a string returned by {@link javax.management.remote.JMXPrincipal#getName() JMXPrincipal.getName()}. This string must not contain spaces.

The ArbitraryText is any additional text that the connector server adds when creating the client id. At a minimum, it must be enough to distinguish this connection ID from the ID of any other connection currently opened by this connector server.

@see Java SE 6 Platform documentation on JMX technology, in particular the JMX Specification, version 1.4 @since 1.5
Java Source File NameTypeComment
JMXAddressable.javaInterface

Implemented by objects that can have a JMXServiceURL address. All JMXConnectorServer objects implement this interface. Depending on the connector implementation, a JMXConnector object may implement this interface too.

JMXAuthenticator.javaInterface

Interface to define how remote credentials are converted into a JAAS Subject.

JMXConnectionNotification.javaClass

Notification emitted when a client connection is opened or closed or when notifications are lost.

JMXConnector.javaInterface

The client end of a JMX API connector.

JMXConnectorFactory.javaClass

Factory to create JMX API connector clients.

JMXConnectorProvider.javaInterface

A provider for creating JMX API connector clients using a given protocol.

JMXConnectorServer.javaClass

Superclass of every connector server.

JMXConnectorServerFactory.javaClass

Factory to create JMX API connector servers.

JMXConnectorServerMBean.javaInterface

MBean interface for connector servers.

JMXConnectorServerProvider.javaInterface

A provider for creating JMX API connector servers using a given protocol.

JMXPrincipal.javaClass

The identity of a remote client of the JMX Remote API.

Principals such as this JMXPrincipal may be associated with a particular Subject to augment that Subject with an additional identity.

JMXProviderException.javaClass
JMXServerErrorException.javaClass Exception thrown as the result of a remote MBeanServer method invocation when an Error is thrown while processing the invocation in the remote MBean server.
JMXServiceURL.javaClass

The address of a JMX API connector server.

MBeanServerForwarder.javaInterface

An object of this class implements the MBeanServer interface and wraps another object that also implements that interface.

NotificationResult.javaClass

Result of a query for buffered notifications.

SubjectDelegationPermission.javaClass

Permission required by an authentication identity to perform operations on behalf of an authorization identity.

A SubjectDelegationPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of the authorization principal classname followed by a period and the authorization principal name, that is "PrincipalClassName.PrincipalName".

An asterisk may appear by itself, or if immediately preceded by a "." may appear at the end of the target name, to signify a wildcard match.

For example, "*", "javax.management.remote.JMXPrincipal.*" and "javax.management.remote.JMXPrincipal.delegate" are valid target names.

TargetedNotification.javaClass
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.