|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.com.WindchillComponent
WindchillComponent is meant to be used as a COM object to connect COM-compliant applications to the Windchill services. It is essentially a wrapper for RemoteMethodServer, and functions in much the same way. Developers wishing to use it would generally be best to write a more heavy-weight application on either the Win32 side or on the Java side of the fence.
If an application is written for Win32 and uses this component, it will be required to use the dispatch interface. For this reason it might be less attractive to use C or C++ as the application language.
If the application is written in Java, this component can be used to create an instance of that application object and invoke methods on it from some Win32 wrapper application that makes calls to invoke. The application will remain entirely encapsulated within the component, and will be unloaded when the component instance is destroyed.
This class is designed to be packaged with a COM DLL output format. The class has no standard entry points, other than the constructor. Public methods will be exposed as methods on the default COM interface.
Field Summary | |
private static String |
className
|
private String |
codebase
|
private String |
jarfile
|
private static WTProperties |
localProperties
|
private Hashtable |
objectCache
|
private String |
password
|
private RemoteMethodServer |
rms
|
private static WTProperties |
serverProperties
|
private String |
username
|
private static boolean |
VERBOSE
|
private WindchillComponentIfc |
winComp
|
Constructor Summary | |
WindchillComponent()
|
Method Summary | |
private void |
bootstrap()
|
String |
getCodebase()
|
String |
getJarfile()
|
com.ms.com.Variant |
getProperty(String key,
com.ms.com.Variant def)
Get a property from the local windchill properties list. |
com.ms.com.Variant |
getServerProperty(String key,
com.ms.com.Variant def)
Get a property from the server's windchill properties list. |
String |
getUsername()
Returns the username currently being used for method invocation. |
void |
initialize()
|
com.ms.com.Variant |
invoke(String targetMethod,
String targetClass,
int targetObjectHandle,
com.ms.com.Variant[] args)
This method wraps RemoteMethodServer.invoke for Win32 applications to access transparently. |
void |
setCodebase(String cb)
NOTE: To add auto-registration code, refer to the documentation on the following method public static void onCOMRegister(boolean unRegister) {} |
void |
setJarfile(String jar)
|
void |
setPassword(String password)
Set the password for authentication. |
void |
setUsername(String username)
Sets the username for all transactions with Windchill. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static WTProperties localProperties
private static WTProperties serverProperties
private static boolean VERBOSE
private String username
private String password
private RemoteMethodServer rms
private Hashtable objectCache
private String codebase
private String jarfile
private static final String className
private WindchillComponentIfc winComp
Constructor Detail |
public WindchillComponent()
Method Detail |
public com.ms.com.Variant invoke(String targetMethod, String targetClass, int targetObjectHandle, com.ms.com.Variant[] args)
The handle is passed back as an int (VT_I4) in a Variant. Passing 0 (zero) in for the handle will ignore the object store.
targetMethod
- The method to invoke.targetClass
- The class that contains the method.targetObjectHandle
- A handle to an object instance to invoke the method from, or 0 (zero).args
- An array of Variant types containing the arguments to pass to the method.
public void setUsername(String username)
username
- The username to authenticate as.public String getUsername()
public void setPassword(String password)
password
- The password for the current user.public com.ms.com.Variant getProperty(String key, com.ms.com.Variant def)
key
- The property key to look up.def
- The default value to return if the property is not found.
public com.ms.com.Variant getServerProperty(String key, com.ms.com.Variant def)
key
- The property key to look up.def
- The default value to return if the property is not found.
public void setCodebase(String cb)
public String getCodebase()
public void setJarfile(String jar)
public String getJarfile()
public void initialize()
private void bootstrap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |