Synergex.util.SWPConnect

java.lang.Object
   Synergex.util.SWPConnect
public class SWPConnect extends Object

The SWPConnect class is used by the Java code that is created when you generate Java class wrappers. This class handles the connection to and disconnection from xfServerPlus. It instantiates a SynergyWebProxy, which actually makes the connection to xfServerPlus.

You do not need to call this class directly.

Constructors

public SWPConnect(File propFile) throws UnknownHostException, IOException, xfServerPlusUnavailableException,
   SynProxyNetException, xfServerNackException

Connects to the host name on the port defined in the specified xfNetLink Java properties file.

propFile – the File object that names the file that contains the settings for xf_RemoteHostName and xf_RemotePort

public SWPConnect(String propFile, String poolID, SWPManager poolManager) throws UnknownHostException,
   IOException, xfServerPlusUnavailableException, SynProxyNetException, xfServerNackException

Connects to the host name and port specified in the named xfNetLink Java properties file. This constructor is used when connection pooling is enabled. It gets a connection from the specified pool.

propFile – a string that contains the full path of the xfNetLink Java properties file

poolID – the ID of the pool from which to get a connection

poolManager – the instance of the pool manager to use

Methods

public int getConnectCount()

Gets the number of connections (SynergyWebProxy objects).

public void incConnectCount()

Increments the connection count.

public SynergyWebProxy getM_swp()

Gets the SynergyWebProxy. Used when sharing a connection.

public void disconnect() throws Exception 

Calls SynergyWebProxy.sendShutdownMessage() to close the connection.