|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object biz.chitec.quarterback.gjsa.ServerConnector
Abstract superclass for old-style and new-style client connections to the server. This class is needed to make the transition to the new-style system easier. Almost everything is declared abstract here and implemented in either LegacyServerConnector (the old one) or SessionConnector (the new one).
Important: You cannot instanciate ServerConnector any more. Instead you have to call one of the factory methods. They instanciate always a LegacyServerConnector which implements everything needed.
Constructor Summary | |
ServerConnector()
|
Method Summary | |
abstract void |
addConnectionDesasterListener(ConnectionDesasterListener cdl)
Add listener for connection desasterts |
abstract void |
addConnectionEncryptionPresentor(ConnectionEncryptionPresentor ccep)
Adds a presentor for the encryption state |
abstract void |
addConnectionStatePresentor(ConnectionStatePresentor ccsp)
Adds a connection state presentor. |
abstract void |
attachSyncBurstReceiver(SyncBurstReceiver sbr)
Attaches and starts a SyncBurstReceiver to this ServerConnector. |
abstract void |
close()
Closes connection, does nothing if a desaster occured before |
abstract void |
connDesaster()
Raises a connection desaster |
abstract void |
connectionOnHold(ServerEnvelope reest)
Closes the connection to the server transparently for higher layers. |
abstract void |
disableErrorMsgs()
|
abstract int |
getEncodingMode()
Return encoding of the connection |
abstract boolean |
isBackgroundSession()
Return whether the connector is throttling. |
abstract boolean |
isEncrypting()
Gets the encrypting attribute of the ServerConnector object |
static ServerConnector |
openLegacyServerConnector(int port)
|
static ServerConnector |
openLegacyServerConnector(java.lang.String host,
int port)
|
static ServerConnector |
openLegacyServerConnector(java.lang.String host,
int port,
java.lang.String encstrat)
|
static ServerConnector |
openLegacyServerConnector(java.lang.String host,
int port,
java.lang.String pname,
java.util.List pvp)
|
static ServerConnector |
openLegacyServerConnector(java.lang.String host,
int port,
java.lang.String pname,
java.util.List pvp,
boolean forcestring,
boolean emptyafter)
|
static ServerConnector |
openLegacyServerConnector(java.lang.String xhost,
int xport,
java.lang.String xpname,
java.util.List xpvp,
boolean xforcestring,
boolean xemptyafter,
java.lang.String xencstrat)
Opens a connection to a GJSA server |
static ServerConnector |
openLegacyServerConnector(java.lang.String host,
int port,
java.lang.String pname,
java.util.List pvp,
java.lang.String encstrat)
|
ServerReply |
query(int cmd)
Query parameterless command |
ServerReply |
query(int cmd,
java.lang.Object p1)
|
ServerReply |
query(int cmd,
java.lang.Object[] params)
Generic one-command query to the server which throws Exception in case of problems |
ServerReply |
query(int cmd,
java.lang.Object p1,
java.lang.Object p2)
|
ServerReply |
query(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3)
|
ServerReply |
query(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3,
java.lang.Object p4)
|
ServerReply |
query(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3,
java.lang.Object p4,
java.lang.Object p5)
|
ServerReply |
query(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3,
java.lang.Object p4,
java.lang.Object p5,
java.lang.Object p6)
|
abstract ServerEnvelope |
query(ServerEnvelope se)
Low level query The ServerEnvelope may contain multiple queries. |
ServerReply |
query(ServerRequest sr)
Query one request, return that reply. |
ServerReply[] |
query(ServerRequest[] sr)
Convenience method, queries multiple queries, returns all replies, everything as arrays. |
ServerReply |
queryNE(int cmd)
Query parameterless command without exception |
ServerReply |
queryNE(int cmd,
java.lang.Object p1)
|
ServerReply |
queryNE(int cmd,
java.lang.Object[] params)
Generic one-command query to the server, IO problems are returned as error reply |
ServerReply |
queryNE(int cmd,
java.lang.Object p1,
java.lang.Object p2)
|
ServerReply |
queryNE(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3)
|
ServerReply |
queryNE(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3,
java.lang.Object p4)
|
ServerReply |
queryNE(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3,
java.lang.Object p4,
java.lang.Object p5)
|
ServerReply |
queryNE(int cmd,
java.lang.Object p1,
java.lang.Object p2,
java.lang.Object p3,
java.lang.Object p4,
java.lang.Object p5,
java.lang.Object p6)
|
ServerEnvelope |
queryNE(ServerEnvelope se)
Low level query without exception The ServerEnvelope may contain multiple queries. |
ServerReply |
queryNE(ServerRequest sr)
Query one requests, exceptions are expressed as errors. |
ServerReply[] |
queryNE(ServerRequest[] sr)
Performs multiple queries with catching all IOExceptions. |
abstract void |
removeConnectionDesasterListener(ConnectionDesasterListener cdl)
Remove listener for connection desasters |
abstract void |
removeConnectionStatePresentor()
Removes the presentor for the connection state |
abstract void |
setBackgroundSession(boolean b)
Set the connector to "throttling" mode => if someone else is sending, wait for that one to finish. |
abstract void |
setFreeFloatingInterface(ThreadInterface ti)
Set the interface where free floating messages are sent to. |
abstract void |
setMessageLogger(Logger mx)
Sets the messageLogger attribute of the ServerConnector object |
abstract void |
setReaderPriority(int newprio)
Set priority of the reader thread. |
abstract void |
startLineWakeupToggler()
|
abstract void |
stopSyncBurstReceiver()
Stops a currently running SyncBurstReceiver. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ServerConnector()
Method Detail |
public static ServerConnector openLegacyServerConnector(java.lang.String xhost, int xport, java.lang.String xpname, java.util.List xpvp, boolean xforcestring, boolean xemptyafter, java.lang.String xencstrat) throws java.io.IOException
xhost
- host namexport
- port numberxpname
- protocol namexpvp
- local protocol versionxforcestring
- flag to force string communicationxemptyafter
- flag to send an empty command after each commandxencstrat
- encryption strategy
java.io.IOException
- raised if opening fails for any reasonpublic static ServerConnector openLegacyServerConnector(java.lang.String host, int port, java.lang.String pname, java.util.List pvp, boolean forcestring, boolean emptyafter) throws java.io.IOException
java.io.IOException
public static ServerConnector openLegacyServerConnector(java.lang.String host, int port, java.lang.String pname, java.util.List pvp, java.lang.String encstrat) throws java.io.IOException
java.io.IOException
public static ServerConnector openLegacyServerConnector(java.lang.String host, int port, java.lang.String pname, java.util.List pvp) throws java.io.IOException
java.io.IOException
public static ServerConnector openLegacyServerConnector(java.lang.String host, int port, java.lang.String encstrat) throws java.io.IOException
java.io.IOException
public static ServerConnector openLegacyServerConnector(java.lang.String host, int port) throws java.io.IOException
java.io.IOException
public static ServerConnector openLegacyServerConnector(int port) throws java.io.IOException
java.io.IOException
public abstract boolean isEncrypting()
public abstract void connectionOnHold(ServerEnvelope reest) throws java.io.IOException
The next query sent to the ServerConnector will reestablish the connection. After opening the ports, the complete reest ServerEnvelope will be sent to the server to reach the state it had on closing.
reest
- Description of the Parameter
java.io.IOException
- Description of the Exceptionpublic abstract void setMessageLogger(Logger mx)
mx
- The new messageLogger valuepublic abstract void disableErrorMsgs()
public abstract void startLineWakeupToggler()
public abstract void stopSyncBurstReceiver()
public abstract void attachSyncBurstReceiver(SyncBurstReceiver sbr)
sbr
- Description of the Parameterpublic abstract void close()
public abstract void connDesaster()
public abstract void addConnectionStatePresentor(ConnectionStatePresentor ccsp)
public abstract void addConnectionEncryptionPresentor(ConnectionEncryptionPresentor ccep)
public abstract void removeConnectionStatePresentor()
public abstract int getEncodingMode()
public abstract void addConnectionDesasterListener(ConnectionDesasterListener cdl)
public abstract void removeConnectionDesasterListener(ConnectionDesasterListener cdl)
public abstract void setFreeFloatingInterface(ThreadInterface ti)
public abstract void setReaderPriority(int newprio)
public abstract void setBackgroundSession(boolean b)
public abstract boolean isBackgroundSession()
public abstract ServerEnvelope query(ServerEnvelope se) throws java.io.IOException
This method is the one which actually communicates with the server. All other query methods finally call this one.
se
- ServerEnvelope with one or more queries set
java.io.IOException
- If something goes wrong in the communication between client and serverServerEnvelope
public final ServerEnvelope queryNE(ServerEnvelope se)
se
- ServerEnvelope with one or more queries set
public final ServerReply[] query(ServerRequest[] sr) throws java.io.IOException
sr
- Array of queries
java.io.IOException
public final ServerReply[] queryNE(ServerRequest[] sr)
sr
- Array of queries
public final ServerReply query(ServerRequest sr) throws java.io.IOException
java.io.IOException
public final ServerReply queryNE(ServerRequest sr)
public final ServerReply query(int cmd, java.lang.Object[] params) throws java.io.IOException
cmd
- Command symbols to send to the serverparams
- Parameters for the command. May be null or of size 0.
java.io.IOException
public final ServerReply query(int cmd) throws java.io.IOException
java.io.IOException
public final ServerReply query(int cmd, java.lang.Object p1) throws java.io.IOException
java.io.IOException
public final ServerReply query(int cmd, java.lang.Object p1, java.lang.Object p2) throws java.io.IOException
java.io.IOException
public final ServerReply query(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3) throws java.io.IOException
java.io.IOException
public final ServerReply query(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4) throws java.io.IOException
java.io.IOException
public final ServerReply query(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4, java.lang.Object p5) throws java.io.IOException
java.io.IOException
public final ServerReply query(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4, java.lang.Object p5, java.lang.Object p6) throws java.io.IOException
java.io.IOException
public final ServerReply queryNE(int cmd, java.lang.Object[] params)
cmd
- Command symbols to send to the serverparams
- Parameters for the command. May be null or of size 0.
public final ServerReply queryNE(int cmd)
public final ServerReply queryNE(int cmd, java.lang.Object p1)
public final ServerReply queryNE(int cmd, java.lang.Object p1, java.lang.Object p2)
public final ServerReply queryNE(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3)
public final ServerReply queryNE(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4)
public final ServerReply queryNE(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4, java.lang.Object p5)
public final ServerReply queryNE(int cmd, java.lang.Object p1, java.lang.Object p2, java.lang.Object p3, java.lang.Object p4, java.lang.Object p5, java.lang.Object p6)
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |