Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.2 Online Documentation (MoTW) Revision 3

Reality Interface Classes: Class RSCConnection (JReal) (rscconnection.html)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

Reality Interface Classes

com.northgateis.reality.rsc
Class RSCConnection

java.lang.Object
 |
 +--java.util.Observable
 |
 +--com.northgateis.reality.rsc.RSCConnection
Direct Known Subclasses:
RealWeb

public class RSCConnection
extends java.util.Observable

Creates and manages a new connection to an RSC server.

Provides methods to generate primitive RSC server operations.

Apart from the constructor, the only methods that need to be called directly from this class are connect() and disconnect(). The primative RSC server operations are normally invoked via the RSC class. See this class for more information.


Constructor Summary
RSCConnection(DDAConnectionSpec spec)
          Configure a new RSC connection using a DDAConnectionSpec
RSCConnection(java.lang.String host, int port, java.lang.String database, java.lang.String userPassword, java.lang.String accountPassword)
          Configure a new RSC connection using a non default port
RSCConnection(java.lang.String section, java.lang.String userPassword, java.lang.String accountPassword)
          Configure a new RSC connection using a winsni.ini file entry.
RSCConnection(java.lang.String host, java.lang.String database, java.lang.String userPassword, java.lang.String accountPassword)
          Configure a new RSC connection using the default port
 
Method Summary
 voidconnect()
          connect to the RSC server
 voiddisconnect()
          disconnect from the RSC server
 byte[]doItAll(byte[] buf)
          Send a DOITALL command to the server and await its response
 voidexecute(int reference)
          Send an EXECUTE command to the server and await its response
 byte[]getParam(int reference, int index)
          Get a parameter from the server
 voidprepare(RSCDescriptor desc)
          Send a prepare message to the server and process its response.
 voidrelease(int reference, int type)
          Send a RELEASE command to the server of type specified and await its response
 voidreleaseData(int reference)
          Send a RELEASE command to the server specifying only release the data, and await its response
 voidreleaseSubroutine(int reference)
          Send a RELEASE command to the server specifying release the subroutine, and await its response
 voidsendParam(int reference, int index, byte[] value)
          Send a parameter to the server
 voidsetServer(java.lang.String name)
          Set the server name to connect to.
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSCConnection

public RSCConnection(java.lang.String host,
 int port,
 java.lang.String database,
 java.lang.String userPassword,
 java.lang.String accountPassword)
Configure a new RSC connection using a non default port
Parameters:
host - String specifying the host name to connect to.
port - the port number to use.
database - String specifying the database name to connect to.
userPassword - String specifying the user-id used to connect to the database, with an optional comma separated password
accountPassword - String specifying the account used to connect to the database, with an optional comma separated password

RSCConnection

public RSCConnection(java.lang.String host,
 java.lang.String database,
 java.lang.String userPassword,
 java.lang.String accountPassword)
Configure a new RSC connection using the default port
Parameters:
host - String specifying the host name to connect to.
database - String specifying the database name to connect to.
userPassword - String specifying the user-id used to connect to the database, with an optional comma separated password
accountPassword - String specifying the account used to connect to the database, with an optional comma separated password

RSCConnection

public RSCConnection(java.lang.String section,
 java.lang.String userPassword,
 java.lang.String accountPassword)
 throws java.io.IOException
Configure a new RSC connection using a winsni.ini file entry.

Be sure to see the SNI class description on usage of the winsni.ini file

Parameters:
section - String specifying the winsni section name
userPassword - String specifying the user-id used to connect to the database, with an optional comma separated password
accountPassword - String specifying the account used to connect to the database, with an optional comma separated password


RSCConnection

public RSCConnection(DDAConnectionSpec spec)
Configure a new RSC connection using a DDAConnectionSpec
Parameters:
spec - DDAConnectionSpec specifying connection
Method Detail

connect

public void connect()
 throws RSCException
connect to the RSC server
Throws:
RSCException - something went wrong

disconnect

public void disconnect()
disconnect from the RSC server

prepare

public void prepare(RSCDescriptor desc)
 throws RSCException
Send a prepare message to the server and process its response. The response to a prepare message is a string describing the parameters of the subroutine. This string is saved in the RSCDescriptor.
Parameters:
desc - RSCDescriptor of subroutine
Throws:
RSCException - something went wrong

sendParam

public void sendParam(int reference,
 int index,
 byte[] value)
 throws RSCException
Send a parameter to the server

getParam

public byte[] getParam(int reference,
 int index)
 throws RSCException
Get a parameter from the server

execute

public void execute(int reference)
 throws RSCException
Send an EXECUTE command to the server and await its response

doItAll

public byte[] doItAll(byte[] buf)
 throws RSCException
Send a DOITALL command to the server and await its response
Parameters:
buf - byte array containing DOITALL command
Returns:
String in SENDALL format containing the subroutines results
Throws:
RSCException - something went wrong

releaseData

public void releaseData(int reference)
 throws RSCException
Send a RELEASE command to the server specifying only release the data, and await its response

releaseSubroutine

public void releaseSubroutine(int reference)
 throws RSCException
Send a RELEASE command to the server specifying release the subroutine, and await its response

release

public void release(int reference,
 int type)
 throws RSCException
Send a RELEASE command to the server of type specified and await its response

setServer

public void setServer(java.lang.String name)
Set the server name to connect to.
Parameters:
server - the new server name.

Reality Interface Classes

Copyright (c) 2000 Northgate Public Services (UK) Limited

RealityV15.2Revision 3Comment on this topic