/*
** Class: PropertyServer
** Version: 1.1.0
** Author: Dario de Judicibus
** E-mail: dejudicibus@geocities.com
** Created on: June 10th, 1998
** Changed on: June 21st, 1998
** Language: Java (jdk 1.1)
** -------------------------------------------------------------
** (c) 1998 - All rights reserved
** -------------------------------------------------------------
** I make no representations or warranties about the suitability of
** the software, either express or implied, including but not limited
** to the implied warranties of merchantability, fitness for a
** particular purpose, or non-infringement. I shall not be liable for
** any damages suffered by licensee as a result of using, modifying or
** distributing this software or its derivatives.
*/
import java.rmi.* ;
import java.rmi.server.* ;
/**
* @author Dario de Judicibus
* @version 1.0.0
* @see jdk 1.1
* Create a RemotePropertyImpl object
*
1.1.0 - New file - Added cvServerNane
*/
public class RemotePropertyServer
{
private static String cvObjectName = "RemoteProperty" ;
public static void main( String args[] )
{
// Create and install a security manager
System.setSecurityManager( new RMISecurityManager( ) ) ;
String serverUrl = cvObjectName ;
if ( args.length == 1 )
{
serverUrl = "rmi://" + args[ 0 ] + "/" + cvObjectName ;
}
try
{
RemotePropertyImpl obj = new RemotePropertyImpl( ) ;
Naming.rebind( serverUrl, obj );
System.out.println( serverUrl + " bound in registry" ) ;
}
catch ( Exception e )
{
System.out.println( serverUrl + " error: " + e.getMessage( ) ) ;
e.printStackTrace( ) ;
}
}
}