com.jniwrapper.win32.tools
Class RegisterDispatchComServer

java.lang.Object
  extended bycom.jniwrapper.win32.tools.RegisterDispatchComServer

public class RegisterDispatchComServer
extends java.lang.Object

This class is responsible for the java COM server registration in the Windows Registry. It allows to register servers in the Console Mode or at the program's runtime.

Usage: java [-classpath including JNIWrapper library] [-options] com.jniwrapper.win32.tools.RegisterDispatchComServer ServerClassName

Options:

Sample: java -cp jniwrap.jar;comfyj.jar -Dclasspath=C:/JavaComServer;C:/JavaComServer/jniwrap.jar -Djvm.path=C:/j2sdk/bin/javaw.exe com.jniwrapper.win32.tools.RegisterDispatchComServer ComServer1


Nested Class Summary
static class RegisterDispatchComServer.ComServerDescriptor
          This class is the descriptor of a Java COM server.
 
Method Summary
static boolean isRegistered(CLSID clsid)
          Returns true if the Java COM server is registered, otherwise false
static boolean isRegisteredForAllUsers(CLSID clsid)
          Returns true if the Java COM server registered for all users, otherwise false
static boolean isRegisteredForCurrentUser(CLSID clsid)
          Returns true if the Java COM server registered for current user, otherwise false
static void main(java.lang.String[] args)
           
static void registerComServer(RegisterDispatchComServer.ComServerDescriptor descriptor, boolean currentUserOnly, java.util.List warnings)
          Registers the specified Java COM server with ability to specify whesere the COM server is for current user only or not
static void registerComServer(RegisterDispatchComServer.ComServerDescriptor descriptor, java.util.List warnings)
          Registers the specified Java COM server for all users by default
static void unregisterComServer(CLSID clsid)
          Unregisters the Java COM server specified by the CLSID
static void unregisterComServer(CLSID clsid, boolean currentUserOnly)
          Unregisters the Java COM server specified by the CLSID with ability to specify whesere the COM server is for current user only or not
static void unregisterComServer(RegisterDispatchComServer.ComServerDescriptor descriptor)
          Unregisters the specified Java COM server
static void unregisterComServer(RegisterDispatchComServer.ComServerDescriptor descriptor, boolean currentUserOnly)
          Unregisters the specified Java COM server with ability to specify whesere the COM server is for current user only or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerComServer

public static void registerComServer(RegisterDispatchComServer.ComServerDescriptor descriptor,
                                     boolean currentUserOnly,
                                     java.util.List warnings)
Registers the specified Java COM server with ability to specify whesere the COM server is for current user only or not

Parameters:
descriptor - Java COM server descriptor
currentUserOnly - true if the COM server is for current user only and false if not

registerComServer

public static void registerComServer(RegisterDispatchComServer.ComServerDescriptor descriptor,
                                     java.util.List warnings)
Registers the specified Java COM server for all users by default

Parameters:
descriptor - Java COM server descriptor

unregisterComServer

public static void unregisterComServer(RegisterDispatchComServer.ComServerDescriptor descriptor,
                                       boolean currentUserOnly)
Unregisters the specified Java COM server with ability to specify whesere the COM server is for current user only or not

Parameters:
descriptor - Java COM server descriptor
currentUserOnly - true if the COM server is registered for current user only and false if not

unregisterComServer

public static void unregisterComServer(RegisterDispatchComServer.ComServerDescriptor descriptor)
Unregisters the specified Java COM server

Parameters:
descriptor - Java COM server descriptor

unregisterComServer

public static void unregisterComServer(CLSID clsid,
                                       boolean currentUserOnly)
Unregisters the Java COM server specified by the CLSID with ability to specify whesere the COM server is for current user only or not

Parameters:
clsid - CLSID of the Java COM server
currentUserOnly - true if the COM server is registered for current user only and false if not

unregisterComServer

public static void unregisterComServer(CLSID clsid)
Unregisters the Java COM server specified by the CLSID

Parameters:
clsid - CLSID of the Java COM server

isRegisteredForCurrentUser

public static boolean isRegisteredForCurrentUser(CLSID clsid)
Returns true if the Java COM server registered for current user, otherwise false

Parameters:
clsid - CLSID of the Java COM server
Returns:
true if the Java COM server registered for current user, otherwise false

isRegisteredForAllUsers

public static boolean isRegisteredForAllUsers(CLSID clsid)
Returns true if the Java COM server registered for all users, otherwise false

Parameters:
clsid - CLSID of the Java COM server
Returns:
true if the Java COM server registered for all users, otherwise false

isRegistered

public static boolean isRegistered(CLSID clsid)
Returns true if the Java COM server is registered, otherwise false

Parameters:
clsid - CLSID of the Java COM server
Returns:
true if the Java COM server is registered, otherwise false

main

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