Examples of RMIServerSocketFactory


Examples of java.rmi.server.RMIServerSocketFactory

            authenticator = new Authenticator(applicationConfigName, classLoader);
            env.put(JMXConnectorServer.AUTHENTICATOR, authenticator);
        } else {
            log.warn("Starting unauthenticating JMXConnector for " + jmxServiceURL);
        }
        RMIServerSocketFactory serverSocketFactory = new GeronimoRMIServerSocketFactory(host);
        env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, serverSocketFactory);
        server = JMXConnectorServerFactory.newJMXConnectorServer(jmxServiceURL, env, mbeanServer);
        NotificationFilterSupport filter = new NotificationFilterSupport();
        filter.enableType(JMXConnectionNotification.OPENED);
        filter.enableType(JMXConnectionNotification.CLOSED);
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

        }
        if (System.getProperty("java.rmi.server.hostname") == null && host != null && !host.equals("0.0.0.0")) {
            System.setProperty("java.rmi.server.hostname", host);
        }
        RMIClientSocketFactory socketFactory = RMISocketFactory.getDefaultSocketFactory();
        RMIServerSocketFactory serverSocketFactory = new GeronimoRMIServerSocketFactory(host);
        registry = LocateRegistry.createRegistry(port, socketFactory, serverSocketFactory);
        log.debug("Started RMI Registry on port: {}", port);
    }
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

     */
    private void createConnector(MBeanServer mbeanServer) throws MalformedObjectNameException, MalformedURLException, IOException {
        // Create the NamingService, needed by JSR 160
        try {
            if (registry == null) {
                registry = LocateRegistry.createRegistry(connectorPort, null, new RMIServerSocketFactory() {
                    public ServerSocket createServerSocket(int port)
                            throws IOException {
                        ServerSocket result = new ServerSocket(port);
                        result.setReuseAddress(true);
                        return result;
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

      {
         clientConnectHost = bindHost;
      }

      locator.setHomeInUse(bindHome);
      RMIServerSocketFactory ssf = new RemotingRMIServerSocketFactory(getServerSocketFactory(), BACKLOG_DEFAULT, bindHost, getTimeout());
      csf = getRMIClientSocketFactory(clientConnectHost);
      stub = UnicastRemoteObject.exportObject(this, bindPort, csf, ssf);

      log.debug("Binding server to \"remoting/RMIServerInvoker/" + bindPort + "\" in registry");
      registry.rebind("remoting/RMIServerInvoker/" + bindPort, this);
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

        int port = appRegistry.getConfiguration().getJMXManagementPort();


        //Socket factories for the RMIConnectorServer, either default or SLL depending on configuration
        RMIClientSocketFactory csf;
        RMIServerSocketFactory ssf;

        //check ssl enabled option in config, default to true if option is not set
        boolean sslEnabled = appRegistry.getConfiguration().getManagementSSLEnabled();

        if (sslEnabled)
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

                        new AccessFileCheckerAuthenticator(env));
            }
        }

        RMIClientSocketFactory csf = null;
        RMIServerSocketFactory ssf = null;

        if (useSsl || useRegistrySsl) {
            csf = new JGDISslRMIClientSocketFactory(url.getHost(), serverPort, JGDIAgent.getCaTop());
            ssf = new JGDISslRMIServerSocketFactory(url.getHost(), serverPort, JGDIAgent.getCaTop(), enabledCipherSuites,
                    enabledProtocols, sslNeedClientAuth);
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

    public void start(StartContext context) throws StartException {
        log.info("Starting remote JMX connector");
        setRmiServerProperty(serverPortBinding.getValue().getAddress().getHostAddress());
        try {
            SocketBinding registryBinding = registryPortBinding.getValue();
            RMIServerSocketFactory registrySocketFactory = new JMXServerSocketFactory(registryBinding);
            SocketBinding rmiServerBinding = serverPortBinding.getValue();
            RMIServerSocketFactory serverSocketFactory = new JMXServerSocketFactory(rmiServerBinding);

            registry = LocateRegistry.createRegistry(getRmiRegistryPort(), null, registrySocketFactory);
            HashMap<String, Object> env = new HashMap<String, Object>();

            rmiServer = new RMIJRMPServerImpl(getRmiServerPort(), null, serverSocketFactory, env);
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

        String ksAlias = ContainerConfig.getPropertyValue(cfg, "ssl-keystore-alias", null);
        boolean clientAuth = ContainerConfig.getPropertyValue(cfg, "ssl-client-auth", false);

        // setup the factories
        RMIClientSocketFactory csf = null;
        RMIServerSocketFactory ssf = null;

        // get the classloader
        ClassLoader loader = Thread.currentThread().getContextClassLoader();

        // load the factories
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

     */
    private void createConnector(MBeanServer mbeanServer) throws MalformedObjectNameException, MalformedURLException, IOException {
        // Create the NamingService, needed by JSR 160
        try {
            if (registry == null) {
                registry = LocateRegistry.createRegistry(connectorPort, null, new RMIServerSocketFactory() {
                    public ServerSocket createServerSocket(int port)
                            throws IOException {
                        registrySocket = new ServerSocket(port);
                        registrySocket.setReuseAddress(true);
                        return registrySocket;
View Full Code Here

Examples of java.rmi.server.RMIServerSocketFactory

            // Create the environment
            HashMap<String,Object> env = new HashMap<String,Object>();

            RMIClientSocketFactory csf = null;
            RMIServerSocketFactory ssf = null;

            // Configure SSL for RMI connection if required
            if (rmiSSL) {
                csf = new SslRMIClientSocketFactory();
                ssf = new SslRMIServerSocketFactory(ciphers, protocols,
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.