Method reference

Listed below are the public utility methods included in the procedural classes in your Synergy JAR file. All of these methods are available in all procedural classes with the exception of the four enumeration methods, which are included only when needed.

connect()

public void connect() throws xfJCWException

Sends a request to xfServerPlus for a dedicated connection and connects on the host and port defined in the xfNetLink Java properties file or specified with setxfHost() and setxfPort(). See Connect to xfServerPlus.

debugInit()

public void debugInit(String clientIP, StringBuffer listeningIP, StringBuffer listeningPort) throws xfJCWException

Initializes a connection to xfServerPlus so you can manually start an xfServerPlus session in debug mode. See Running an xfServerPlus session in debug mode from xfNetLink Java.

clientIP – the IP or name of the xfNetLink Java client machine

listeningIP – returns the IP address, in hex, where the client is listening

listeningPort – returns the port number where the client is listening

debugStart()

public void debugStart(String clientIP) throws xfJCWException

Completes the process of connecting in debug mode that was started with debugInit(). See Running an xfServerPlus session in debug mode from xfNetLink Java.

clientIP – the IP or name of the xfNetLink Java client machine

disconnect()

public void disconnect()

Sends a message to xfServerPlus to close the connection. If an exception occurs, it is written to the log file, if client-side logging is enabled. (This exception is written to logfilename.log. See also Disconnect from xfServerPlus.)

getConnect()

public Object getConnect() throws xfJCWException

Returns the already-established connection of the specified object. See Connect to xfServerPlus.

Note

The getEnumeration(), getIntHolderValue(), and getIntHolder() methods are included in a procedural class only when that class includes a method that has a parameter or return value that is an enumeration, or when a structure passed as a parameter includes an enumeration field.

getEnumeration()

public static getEnumeration(intHolder enumVal) 

Associates an integer value with an enumeration member. This method is used in conjunction with getIntHolderValue() when you need to pass an enumeration parameter as in/out or out. See Using enumerations in xfNetLink Java.

enumVal – the value that was obtained with getIntHolderValue()

getEnumeration()

public static getEnumeration(int enumVal) 

Associates an integer value with an enumeration member. This method is called by the getEnumeration() method above; you do not need to call it directly.

enumVal – the value that was obtained with getIntValue()

getIntHolderValue()

public intHolder getIntHolderValue() 

Returns an intHolder with the value of the enumeration member. This method is used in conjunction with getEnumeration() when you need to pass an enumeration parameter as in/out or out. See Using enumerations in xfNetLink Java.

getIntValue()

public int getIntValue() 

This method is called by getIntHolderValue(); you do not need to call it directly.

getPoolName()

public String getPoolName() 

Returns the pool ID that was used in the call to the usePool() method by this object. If there is no pool (i.e., the usePool() method has not been called on this object), returns a null string.

getSSLCertFile()

public String getSSLCertFile() 

Returns the path and filename of the certificate file stored by setSSLCertFile(). For more information on encryption, see Using xfServerPlus encryption.

getSSLPassword()

public String getSSLPassword() 

Returns the certificate file password stored by setSSLPassword(). For more information on encryption, see Using xfServerPlus encryption.

getSSLSecCompliance()

public int getSSLSecCompliance()

Returns the security compliance level (0, 1, or 2) set by setSSLSecCompliance(). See setSSLSecCompliance() for what these values mean. For more information on encryption, see Using xfServerPlus encryption.

getSynergyWebProxy()

public SynergyWebProxy getSynergyWebProxy() 

Returns the internal instance of the SynergyWebProxy (i.e., the connection). If there is no connection, returns null.

getUserString()

public String getUserString()

Returns the string currently stored by setUserString(). See Writing to the xfServerPlus log.

getxfHost()

public String getxfHost()

Returns the host name that was set with setxfHost().

getxfLogfile()

public String getxfLogfile()

Returns the name of the client-side log file that was set with setxfLogfile().

getxfPort()

public int getxfPort()

Returns the port number that was set with setxfPort().

setSSLCertFile()

public void setSSLCertFile(String certFileName)

Sets the certificate file to be used for xfNetLink Java network encryption. For more information on encryption, see Using xfServerPlus encryption.

certFileName – the path and filename of the certificate file to use

setSSLPassword()

public void setSSLPassword(String password)

Sets the password associated with the certificate file. For more information on encryption, see Using xfServerPlus encryption.

password – the password associated with the certificate file

setSSLSecCompliance()

public void setSSLSecCompliance(int level)

Sets the security compliance level to indicate which protocols should be used for encryption. For more information on encryption, see Using xfServerPlus encryption.

level – the security compliance level. One of the following:

0 = always use whatever the current Synergy default is
1 = use protocols TLS 1.0, TLS 1.1, TLS 1.2 (default)
2 = use protocols TLS 1.1 and TLS 1.2

Note

JDK 1.5 and 1.6 support only TLS 1.0. For TLS 1.1 and 1.2 support, you must use JDK 1.7 or higher.

If encryption is enabled and the security compliance level is not specified with this method, the default is used. The security compliance level should be set to the same value on the xfNetLink machine as it is on the xfServerPlus machine.

setUserString()

public void setUserString(String userString) throws xfJCWException

Passes a user string to the xfServerPlus log. See Writing to the xfServerPlus log.

userString – the text that you want to write to the xfServerPlus log

setxfCallTimeout()

public void setxfCallTimeout(int seconds) throws xfJCWException

Sets the call time-out value, which measures the length of time that the client waits for a return from a remote call. See Setting a call time-out programmatically.

seconds – the number of seconds you want the xfNetLink Java client to wait for a return from a call to xfServerPlus. The default is 1800 seconds (30 minutes).

setxfExceptOnly()

public int setxfExceptOnly(boolean logging) 

Turns on error-only client-side logging when used in conjunction with setxfLogging(). See Using client-side logging for details and an example.

logging – When set to true, activates error-only logging.

setxfHost()

public void setxfHost(String hostName)

Specifies the host name of the server machine.

hostName – the IP address or host name of the machine where xfServerPlus is running

setxfLogfile()

public int setxfLogfile(String logFilename)

Specifies the name of the log file for client-side logging. If not specified, data is sent to stderr. See Using client-side logging for details and an example.

logFilename – the filename to which you want logging output written. To specify an exact location, use a full path with double slashes as separators. If no path is specified, the file will be placed in the current directory. If the file does not exist, it is created; if it already exists, additional material is appended to the end. Some logging output also goes to this filename with JCW appended to the end (logfilenameJCW.log); see Using client-side logging for details on file naming and what information goes to which file.

setxfLogging()

public int setxfLogging(boolean logging)

Turns on full client-side logging. If used in conjunction with setxfExceptOnly(), turns on error-only logging. See Using client-side logging for details and an example.

logging – When set to true, activates full logging (exceptions, packets, methods and their parameters).

setxfPort()

public void setxfPort(int port)

Sets the port number of the machine on which xfServerPlus is running.

port – the port number that xfServerPlus is listening on for remote session requests. Must in the range 1024 through 65534. The default is 2356.

shareConnect()

public void shareConnect(Object connection) throws xfJCWException

Shares the specified connection. See Connect to xfServerPlus.

connection – the object that represents the connection

usePool()

public void usePool(String poolID, SWPManager poolManager)

Indicates that the object will be using Java connection pooling.

poolID – the ID of the pool to use

pool – the instance of the pool manager to use. This is instantiated with the SWPManager.getInstance() method. For more information on getInstance(), see Synergex.util.SWPManager.