com.accendia.netstart.client.service
Class ConnectionContext

java.lang.Object
  extended by com.accendia.netstart.client.service.ConnectionContext

public class ConnectionContext
extends java.lang.Object

This class provides access to the ServerContext connection object that is used by the JNetStart network class loader to load the application. The application can use the connection object to invoke other Iris applications installed on the server. For more information regarding developing client/server applications for Iris consult the Iris Server documentation.

The regular Swing application is a client for a service installed on the server from where it is loaded. By reusing the JNetStart connection the number of socket connections to the server is limited to one and the application startup time is reduced substantially.


Method Summary
static ConnectionContext getConnectionContext()
          Returns the browser context associated with the network class loader that is loading the application.
 com.accendia.iris.client.ServerContext getServerContext()
          Returns the ServerContext connection object that is created by JNetStart to load the application.
 void releaseServerContext()
          This method should be called if the loaded application finished using the ServerContext so the JNetStart class loader can close the connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getConnectionContext

public static ConnectionContext getConnectionContext()
Returns the browser context associated with the network class loader that is loading the application.

Returns:
The browser context

getServerContext

public com.accendia.iris.client.ServerContext getServerContext()
                                                        throws java.io.IOException
Returns the ServerContext connection object that is created by JNetStart to load the application. The network class loader will not close the connection after this call.

Returns:
The ServerContext connection to the Iris Server.
Throws:
java.io.IOException - If the JNetStart fails to reconnect to the server

releaseServerContext

public void releaseServerContext()
This method should be called if the loaded application finished using the ServerContext so the JNetStart class loader can close the connection. This is the case for clients that invoke applications installed on the Iris server only at application startup. If the client creates session objects on remote applications the server context should never be released.