org.rhq.plugins.jslee.jbossas5.util
Class JnpConfig

java.lang.Object
  extended by org.rhq.plugins.jslee.jbossas5.util.JnpConfig

public class JnpConfig
extends java.lang.Object

This class will parse the passed File in the getConfig method. This file is normally the jboss-service.xml file in the conf directory of the JBoss Server.

Using a SaxParser it will look for the MBean tag for Naming, when it finds that it is in that tag, it will then look for the Port attribute to determine the jnp port

The JBossServerHandler class handles the searching, by determining when the SAX parser has started reading the element that has the text that is being searched, and when that element has ended.

Config parsing intended only for JBoss server auto discovery.


Nested Class Summary
static class JnpConfig.LocalEntityResolver
           
 
Method Summary
static JnpConfig getConfig(java.io.File distributionDirectory, java.io.File configXML, java.util.Properties systemProperties)
           
 java.lang.String getJnpAddress()
          Returns the JNP address, or null if the address could not be determined.
 java.lang.Integer getJnpPort()
          Returns the JNP port, or null if the port could not be determined.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConfig

public static JnpConfig getConfig(java.io.File distributionDirectory,
                                  java.io.File configXML,
                                  java.util.Properties systemProperties)

getJnpPort

@Nullable
public java.lang.Integer getJnpPort()
Returns the JNP port, or null if the port could not be determined.

Returns:
the JNP port, or null if the port could not be determined

getJnpAddress

@Nullable
public java.lang.String getJnpAddress()
Returns the JNP address, or null if the address could not be determined.

Returns:
the JNP address, or null if the address could not be determined

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2012. All Rights Reserved.