com.sas.net.connect
Class RemoteObjectExtension

com.sas.net.connect.RemoteObjectExtension
All Implemented Interfaces:
com.sas.net.connect.ConnectClientExtensionInterface

public class RemoteObjectExtension
implements com.sas.net.connect.ConnectClientExtensionInterface

extends the functionality of ConnectClient to support remote SAS/AF objects


Field Summary
protected  ConnectClient client
           
protected  java.util.Properties properties
           
protected  java.util.Hashtable recordTable
           
protected  boolean remoteInited
           
protected  RemoteObject remoteInstance
           
protected  java.util.Hashtable remoteObjectTable
           
static java.lang.String resourceBundleName
          Remote Object Exntension resource bundle name.
static java.lang.String SERVERENCODING
          Name of the property which defines the server encoding.
static java.lang.String SERVERENCODING_DEFAULT
          The default value of the SERVERENCODING property.
static java.lang.String SERVERLISTVERSION
          Name of the property which defines the server encoding the highest HList/SCL list stream version supported by the server.
static java.lang.Integer SERVERLISTVERSION_DEFAULT
          The default value of the SERVERLISTVERSION property.
 
Constructor Summary
RemoteObjectExtension()
           
 
Method Summary
protected  void addRemoteInstance(java.lang.Double handle, RemoteObject remoteObject)
          adds a proxy/handle pair to the extension
 RemoteObject createRemoteInstance(java.lang.String name)
          creates an instance of the named class on the server and returns a proxy for it
protected  void destroyRemoteInstance(RemoteObject remoteObject)
           
 java.lang.Object getProperty(java.lang.String name)
          Get a property from this extension.
 com.sas.net.connect.ConnectRecord getRecords(int recordCode)
          intercepts the appropriate incoming records
protected  RemoteObject getRemoteObject(java.lang.Double handle)
           
protected  void invokeRemoteMethod(RemoteObject remoteObject, java.lang.String name)
           
 void setClient(ConnectClient client)
          notifies this extension of the ConnectClient it is extending
 void setProperty(java.lang.String name, java.lang.Object value)
          Store a property on this extension.
protected  void setRemoteInited(boolean remoteInited)
           
 

Field Detail

SERVERENCODING

public static java.lang.String SERVERENCODING
Name of the property which defines the server encoding. The server's session encoding is passed to the ConnectClient.


SERVERLISTVERSION

public static java.lang.String SERVERLISTVERSION
Name of the property which defines the server encoding the highest HList/SCL list stream version supported by the server.


SERVERLISTVERSION_DEFAULT

public static final java.lang.Integer SERVERLISTVERSION_DEFAULT
The default value of the SERVERLISTVERSION property.


SERVERENCODING_DEFAULT

public static final java.lang.String SERVERENCODING_DEFAULT
The default value of the SERVERENCODING property.

See Also:
Constant Field Values

resourceBundleName

public static final java.lang.String resourceBundleName
Remote Object Exntension resource bundle name.

See Also:
Constant Field Values

client

protected ConnectClient client

recordTable

protected java.util.Hashtable recordTable

remoteInited

protected boolean remoteInited

remoteInstance

protected RemoteObject remoteInstance

remoteObjectTable

protected java.util.Hashtable remoteObjectTable

properties

protected java.util.Properties properties
Constructor Detail

RemoteObjectExtension

public RemoteObjectExtension()
Method Detail

createRemoteInstance

public RemoteObject createRemoteInstance(java.lang.String name)
                                  throws ConnectException
creates an instance of the named class on the server and returns a proxy for it

Parameters:
name - the SAS/AF name of the remote class
Returns:
RemoteObject proxy for the remote instance
Throws:
ConnectException - if there is an error

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws ConnectException
Store a property on this extension. This is used to set the server encoding and list stream version after a handshake with the client, but is more general purpose so other properties may be set.

Parameters:
name - the name of the property
value - the value to associate with the name.
Throws:
ConnectException - if there is an error

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws ConnectException
Get a property from this extension.

Parameters:
name - the name of the property
Returns:
the value associated with the name, or null if no such property exists.
Throws:
ConnectException - if there is an error

setClient

public void setClient(ConnectClient client)
notifies this extension of the ConnectClient it is extending

Specified by:
setClient in interface com.sas.net.connect.ConnectClientExtensionInterface
Parameters:
client - the ConnectClient this extension is extending

getRecords

public com.sas.net.connect.ConnectRecord getRecords(int recordCode)
                                             throws ConnectException
intercepts the appropriate incoming records

Specified by:
getRecords in interface com.sas.net.connect.ConnectClientExtensionInterface
Parameters:
recordCode - code from ConnectRecord
Throws:
ConnectException - if there is an error

addRemoteInstance

protected void addRemoteInstance(java.lang.Double handle,
                                 RemoteObject remoteObject)
                          throws ConnectException
adds a proxy/handle pair to the extension

Parameters:
handle - the handle of the remote SAS/AF object
remoteObject - the proxy
Throws:
ConnectException - if there is an error

getRemoteObject

protected RemoteObject getRemoteObject(java.lang.Double handle)
                                throws ConnectException
Throws:
ConnectException

invokeRemoteMethod

protected void invokeRemoteMethod(RemoteObject remoteObject,
                                  java.lang.String name)
                           throws ConnectException
Throws:
ConnectException

destroyRemoteInstance

protected void destroyRemoteInstance(RemoteObject remoteObject)
                              throws ConnectException
Throws:
ConnectException

setRemoteInited

protected void setRemoteInited(boolean remoteInited)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.