Package java.rmi.server

Examples of java.rmi.server.RMIServerSocketFactory


    private void startRegistryAndConnector() throws IOException
    {
        //Socket factories for the RMIConnectorServer, either default or SSL depending on configuration
        RMIClientSocketFactory csf;
        RMIServerSocketFactory ssf;

        //check ssl enabled option on connector port (note we don't provide ssl for registry server at
        //moment).
        boolean connectorSslEnabled = _connectorPort.getTransports().contains(Transport.SSL);
View Full Code Here


    @Override
    public void start(StartContext context) throws StartException {
        log.info("Starting remote JMX connector");
        setRmiServerProperty(serverPortBinding.getValue().getAddress().getHostAddress());
        try {
            RMIServerSocketFactory serverSocketFactory = new JMXServerSocketFactory(getRmiRegistryAddress());

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

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

            // 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) {
                if (rmiBindAddress != null) {
                    throw new IllegalStateException(sm.getString(
View Full Code Here

            // application is already running on the configured host/port
            // or if the rmiHost is not local
            try {
                // find the server socket factory: use the default if the
                // rmiHost is not configured
                RMIServerSocketFactory sf;
                if (rc.getRmiHost().length() > 0) {
                    log.debug("Creating RMIServerSocketFactory for host " + rc.getRmiHost());
                    InetAddress hostAddress = InetAddress.getByName(rc.getRmiHost());
                    sf = getRMIServerSocketFactory(hostAddress);
                } else {
View Full Code Here

     *         creating <code>java.net.ServerSocket</code> instances bound to
     *         the <code>rmiHost</code>.
     */
    protected RMIServerSocketFactory getRMIServerSocketFactory(
            final InetAddress hostAddress) {
        return new RMIServerSocketFactory() {
            public ServerSocket createServerSocket(int port) throws IOException {
                return new ServerSocket(port, -1, hostAddress);
            }
        };
    }
View Full Code Here

            // 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

            // application is already running on the configured host/port
            // or if the rmiHost is not local
            try {
                // find the server socket factory: use the default if the
                // rmiHost is not configured
                RMIServerSocketFactory sf;
                if (rc.getRmiHost().length() > 0) {
                    log.debug("Creating RMIServerSocketFactory for host " + rc.getRmiHost());
                    InetAddress hostAddress = InetAddress.getByName(rc.getRmiHost());
                    sf = getRMIServerSocketFactory(hostAddress);
                } else {
View Full Code Here

     *         creating <code>java.net.ServerSocket</code> instances bound to
     *         the <code>rmiHost</code>.
     */
    protected RMIServerSocketFactory getRMIServerSocketFactory(
            final InetAddress hostAddress) {
        return new RMIServerSocketFactory() {
            public ServerSocket createServerSocket(int port) throws IOException {
                return new ServerSocket(port, -1, hostAddress);
            }
        };
    }
View Full Code Here

        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

            // application is already running on the configured host/port
            // or if the rmiHost is not local
            try {
                // find the server socket factory: use the default if the
                // rmiHost is not configured
                RMIServerSocketFactory sf;
                if (rc.getRmiHost().length() > 0) {
                    log.debug("Creating RMIServerSocketFactory for host " + rc.getRmiHost());
                    InetAddress hostAddress = InetAddress.getByName(rc.getRmiHost());
                    sf = getRMIServerSocketFactory(hostAddress);
                } else {
View Full Code Here

TOP

Related Classes of java.rmi.server.RMIServerSocketFactory

Copyright © 2018 www.massapicom. 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.