Examples of RMIServerImpl


Examples of javax.management.remote.rmi.RMIServerImpl

   public JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment) throws IOException
   {
      // See javax/management/remote/rmi/package-summary.html

      RMIServerImpl rmiServer = (RMIServerImpl)server;

      RmiConnectorActivator.log(LogService.LOG_DEBUG,"JMXServiceURL for binding is: '" + url + "'",null);

      if (isEncodedForm(url))
      {
         String path = encodeStub(rmiServer, environment);
         return new JMXServiceURL(url.getProtocol(), url.getHost(), url.getPort(), path);
      }

      String jndiURL = parseJNDIForm(url);
      RmiConnectorActivator.log(LogService.LOG_DEBUG,"JMXServiceURL path for binding is: '" + jndiURL + "'", null);

      InitialContext ctx = null;
      try
      {
         ctx = new InitialContext(new Hashtable(environment));
         boolean rebind = Boolean.valueOf((String)environment.get(RMIConnectorServer.JNDI_REBIND_ATTRIBUTE)).booleanValue();
         if (rebind)
            ctx.rebind(jndiURL, rmiServer.toStub());
         else
            ctx.bind(jndiURL, rmiServer.toStub());
         RmiConnectorActivator.log(LogService.LOG_DEBUG,"Bound " + rmiServer + " to " + jndiURL, null);
         return url;
      }
      catch (NamingException x)
      {
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

         *
         * The registry is exported on the defined management port 'port'. We will export the RMIConnectorServer
         * on 'port +1'. Use of these two well-defined ports will ease any navigation through firewall's.
         */
        final Map<String, String> connectionIdUsernameMap = new ConcurrentHashMap<String, String>();
        final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(_jmxPortConnectorServer, csf, ssf, env)
        {

            /**
             * Override makeClient so we can cache the username of the client in a Map keyed by connectionId.
             * ConnectionId is guaranteed to be unique per client connection, according to the JMX spec.
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

         *
         * The registry is exported on the defined management port 'port'. We will export the RMIConnectorServer
         * on 'port +1'. Use of these two well-defined ports will ease any navigation through firewall's.
         */
        final Map<String, String> connectionIdUsernameMap = new ConcurrentHashMap<String, String>();
        final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(_jmxPortConnectorServer, csf, ssf, env)
        {

            /**
             * Override makeClient so we can cache the username of the client in a Map keyed by connectionId.
             * ConnectionId is guaranteed to be unique per client connection, according to the JMS spec.
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

         * the RMIConnectorServer stub to the registry using its object reference, which will still succeed.
         *
         * The registry is exported on the defined management port 'port'. We will export the RMIConnectorServer
         * on 'port +1'. Use of these two well-defined ports will ease any navigation through firewall's.
         */
        final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(port+PORT_EXPORT_OFFSET, csf, ssf, env);
        String localHost;
        try
        {
            localHost = InetAddress.getLocalHost().getHostName();
        }
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

   public JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment) throws IOException
   {
      // See javax/management/remote/rmi/package-summary.html

      RMIServerImpl rmiServer = (RMIServerImpl)server;

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("JMXServiceURL for binding is: '" + url + "'");

      if (isEncodedForm(url))
      {
         String path = encodeStub(rmiServer, environment);
         return new JMXServiceURL(url.getProtocol(), url.getHost(), url.getPort(), path);
      }
      else
      {
         String jndiURL = parseJNDIForm(url);
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("JMXServiceURL path for binding is: '" + jndiURL + "'");

         InitialContext ctx = null;
         try
         {
            ctx = new InitialContext(new Hashtable(environment));
            boolean rebind = Boolean.valueOf((String)environment.get(RMIConnectorServer.JNDI_REBIND_ATTRIBUTE)).booleanValue();
            if (rebind)
               ctx.rebind(jndiURL, rmiServer.toStub());
            else
               ctx.bind(jndiURL, rmiServer.toStub());
            if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Bound " + rmiServer + " to " + jndiURL);
            return url;
         }
         catch (NamingException x)
         {
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

      return new RMIIIOPServerImpl(environment);
   }

   public JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment) throws IOException
   {
      RMIServerImpl rmiServer = (RMIServerImpl)server;
      Stub stub = (Stub)PortableRemoteObject.toStub(rmiServer);
      stub.connect(getORB(environment));
      return super.bindServer(server, url, environment);
   }
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

         * the RMIConnectorServer stub to the registry using its object reference, which will still succeed.
         *
         * The registry is exported on the defined management port 'port'. We will export the RMIConnectorServer
         * on 'port +1'. Use of these two well-defined ports will ease any navigation through firewall's.
         */
        final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(port+PORT_EXPORT_OFFSET, csf, ssf, env);
        String localHost;
        try
        {
            localHost = InetAddress.getLocalHost().getHostName();
        }
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

         * the RMIConnectorServer stub to the registry using its object reference, which will still succeed.
         *
         * The registry is exported on the defined management port 'port'. We will export the RMIConnectorServer
         * on 'port +1'. Use of these two well-defined ports will ease any navigation through firewall's.
         */
        final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(port+PORT_EXPORT_OFFSET, csf, ssf, env);
        final String hostname = InetAddress.getLocalHost().getHostName();
        final JMXServiceURL externalUrl = new JMXServiceURL(
                "service:jmx:rmi://"+hostname+":"+(port+PORT_EXPORT_OFFSET)+"/jndi/rmi://"+hostname+":"+port+"/jmxrmi");

        final JMXServiceURL internalUrl = new JMXServiceURL("rmi", hostname, port+PORT_EXPORT_OFFSET);
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

   public JMXServiceURL bindServer(Object server, JMXServiceURL url, Map environment) throws IOException
   {
      // See javax/management/remote/rmi/package-summary.html

      RMIServerImpl rmiServer = (RMIServerImpl)server;

      Logger logger = getLogger();
      if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("JMXServiceURL for binding is: '" + url + "'");

      if (isEncodedForm(url))
      {
         String path = encodeStub(rmiServer, environment);
         return new JMXServiceURL(url.getProtocol(), url.getHost(), url.getPort(), path);
      }
      else
      {
         String jndiURL = parseJNDIForm(url);
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("JMXServiceURL path for binding is: '" + jndiURL + "'");

         InitialContext ctx = null;
         try
         {
            ctx = new InitialContext(new Hashtable(environment));
            boolean rebind = Boolean.valueOf((String)environment.get(RMIConnectorServer.JNDI_REBIND_ATTRIBUTE)).booleanValue();
            if (rebind)
               ctx.rebind(jndiURL, rmiServer.toStub());
            else
               ctx.bind(jndiURL, rmiServer.toStub());
            if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Bound " + rmiServer + " to " + jndiURL);
            return url;
         }
         catch (NamingException x)
         {
View Full Code Here

Examples of javax.management.remote.rmi.RMIServerImpl

         * the RMIConnectorServer stub to the registry using its object reference, which will still succeed.
         *
         * The registry is exported on the defined management port 'port'. We will export the RMIConnectorServer
         * on 'port +1'. Use of these two well-defined ports will ease any navigation through firewall's.
         */
        final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(_jmxPortConnectorServer, csf, ssf, env);
        String localHost;
        try
        {
            localHost = InetAddress.getLocalHost().getHostName();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.