com.apelon.apelonserver.client
Class ServerConnection

java.lang.Object
  extended by com.apelon.apelonserver.client.ServerConnection
Direct Known Subclasses:
ServerConnectionJDBC, ServerConnectionSocket

public abstract class ServerConnection
extends Object

A ServerConnection provides the connection from the client to the server. A client should first create a ServerConnection using one of the implmentations such as ServerConnectionJDBC or ServerConnectionSocket. The particular ServerConnection established is then passed into the createInstance methods of the service class like SearchServer, NavServer, NamespaceQuery, ConceptDefQUery

Version:
1.0.0

Copyright (c) 1997 - 2000 Apelon, Inc. All rights reserved.

Author:
Apelon, Inc.

Constructor Summary
ServerConnection()
           
 
Method Summary
 void close()
          Close the connection
protected abstract  String executeQueryRemote(String query)
           
 String ping()
          Ping the server
 void setQueryServer(Class qs, String header)
          This purpose of method builds the query server pool and assicates query server with header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerConnection

public ServerConnection()
Method Detail

close

public void close()
           throws Exception
Close the connection

Throws:
Exception - thrown if there is an error during close of server connection

executeQueryRemote

protected abstract String executeQueryRemote(String query)
                                      throws Exception
Throws:
Exception

ping

public String ping()
Ping the server

Returns:
the result of ping, null on error

setQueryServer

public void setQueryServer(Class qs,
                           String header)
                    throws ClassNotFoundException
This purpose of method builds the query server pool and assicates query server with header. This method is used in multiple RemoteJDBC connection to set up the multiple query server. This method needs to be overriden.

Parameters:
header - query server header to be assoicated with query server class.
Throws:
ClassNotFoundException - thrown if there is no query server class


Copyright © 2011. All Rights Reserved.