Codemesh Runtime v3 C++ API Reference  3.9.205
Public Member Functions | Protected Member Functions | List of all members
xmog_remote_client_options Class Reference

A class that represents the settings that a remote client uses to connect to a shared JVM. More...

#include <xmog_remote_client_options.h>

Public Member Functions

virtual int readClientOptions (const char *file, XMOGVERSION vers=NULL, XMOGCONFIG conf=NULL, XMOGVERSION reserved0=NULL)
 
virtual void setJniFallback (bool jnifb)
 Sets the option that governs whether we want to allow a remote client to fall back to using in-process JNI if it cannot connect to the shared JVM. More...
 
virtual void setJniFallback (const char *jnifb)
 Sets the option that governs whether we want to allow a remote client to fall back to using in-process JNI if it cannot connect to the shared JVM. More...
 
virtual bool getJniFallback () const
 Returns the flag that governs whether a native process is allowed to try in-process JNI if it cannot connect to a shared JVM.
 
virtual void setMainClass (const char *mainClass)
 Sets a convenience option that is only used by the remote launcher. More...
 
virtual char * getMainClass () const
 Returns the configured main class. More...
 
virtual void setAuthenticationString (const char *auth)
 Sets the string that contains the information that will be used to authenticate the client and the server. More...
 
virtual char * getAuthenticationString () const
 Returns the value of the authentication string. More...
 
virtual void setConnectionString (const char *conn)
 Sets the string that contains the information that will be used to connect to the shared JVM server. More...
 
virtual char * getConnectionString () const
 Returns the value of the connection string. More...
 
virtual void setEncryptionString (const char *enc)
 Sets the string that contains the information that will be used to encrypt the data sent between the client and the shared JVM server. More...
 
virtual char * getEncryptionString () const
 Returns the value of the encryption string. More...
 

Protected Member Functions

 xmog_remote_client_options (bool bEnvOverrides=true)
 
 xmog_remote_client_options (const char *filename, bool bEnvOverrides=true)
 
 xmog_remote_client_options (const char *filename, XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0, bool bEnvOverrides=true)
 
 xmog_remote_client_options (XMOGVERSION vers, XMOGCONFIG conf, XMOGVERSION reserved0, bool bEnvOverrides=true)
 
 xmog_remote_client_options (int argc, char *argv[], bool bEnvOverrides=true)
 
void init ()
 
void env_override ()
 
void reset ()
 

Detailed Description

A class that represents the settings that a remote client uses to connect to a shared JVM.

This class is typically used via the xmog_jvm_loader type which inherits all methods (if it was built with remote support). This class supports the following properties:

Setting File or Registry CLI Environment Description
Authentication Authentication -auth XMOG_AUTH The string containing authentication settings.
Connection Connection -conn XMOG_CONNECT The string containing connection settings.
Encryption Encryption -encrypt XMOG_ENCRYPT The string containing encryption settings.
JNI Fallback JniFallback -fallbackjni XMOG_JNI_FALLBACK true if in-process JNI should be used as a fallback option when no remote connection can be established.

Member Function Documentation

◆ getAuthenticationString()

virtual char* xmog_remote_client_options::getAuthenticationString ( ) const
virtual

Returns the value of the authentication string.

The returned string is owned by the callee.

◆ getConnectionString()

virtual char* xmog_remote_client_options::getConnectionString ( ) const
virtual

Returns the value of the connection string.

The returned string is owned by the callee.

◆ getEncryptionString()

virtual char* xmog_remote_client_options::getEncryptionString ( ) const
virtual

Returns the value of the encryption string.

The returned string is owned by the callee.

◆ getMainClass()

virtual char* xmog_remote_client_options::getMainClass ( ) const
virtual

Returns the configured main class.

The returned string is owned by the callee.

See also
setMainClass(const char*)

◆ setAuthenticationString()

virtual void xmog_remote_client_options::setAuthenticationString ( const char *  auth)
virtual

Sets the string that contains the information that will be used to authenticate the client and the server.

The authentication string is in a pseudo URL format that allows the passing of arbitrary options to an authentication plugin.

◆ setConnectionString()

virtual void xmog_remote_client_options::setConnectionString ( const char *  conn)
virtual

Sets the string that contains the information that will be used to connect to the shared JVM server.

The connection string is in a pseudo URL format that allows the passing of arbitrary options to a connection plugin.

◆ setEncryptionString()

virtual void xmog_remote_client_options::setEncryptionString ( const char *  enc)
virtual

Sets the string that contains the information that will be used to encrypt the data sent between the client and the shared JVM server.

The encryption string is in a pseudo URL format that allows the passing of arbitrary options to an encryption plugin.

◆ setJniFallback() [1/2]

virtual void xmog_remote_client_options::setJniFallback ( bool  jnifb)
virtual

Sets the option that governs whether we want to allow a remote client to fall back to using in-process JNI if it cannot connect to the shared JVM.

This option is useful in scenarios where you typically wish to connect to a shared JVM for scalability reasons, but you acknowledge that the shared JVM might be down for maintenance every now and then. In such a situation, you might wish the client to still be able to proceed by using in-process JNI, even if that means that it has to launch its own JVM (something you wish to avoid in this particular scenario).

◆ setJniFallback() [2/2]

virtual void xmog_remote_client_options::setJniFallback ( const char *  jnifb)
virtual

Sets the option that governs whether we want to allow a remote client to fall back to using in-process JNI if it cannot connect to the shared JVM.

This option is useful in scenarios where you typically wish to connect to a shared JVM for scalability reasons, but you acknowledge that the shared JVM might be down for maintenance every now and then. In such a situation, you might wish the client to still be able to proceed by using in-process JNI, even if that means that it has to launch its own JVM (something you wish to avoid in this particular scenario).

Parameters
jnifb"true" or "false".

◆ setMainClass()

virtual void xmog_remote_client_options::setMainClass ( const char *  mainClass)
virtual

Sets a convenience option that is only used by the remote launcher.

This option is useful when you wish to execute a certain class' main() method in the shared JVM. You can simply specify the classname, and the runtime library will do the rest. The class needs to be deployed on the server and you might also have to specify an application identifier (Runtime Configuration, Shared JVM Configuration) to make this work.

Parameters
mainClassthe Java classname in dot-separated form, for example com.codemesh.Test.

The documentation for this class was generated from the following file:

Copyright (c) 1999-2020 by Codemesh, Inc., ALL RIGHTS RESERVED.