***  This interface provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.storedprocess
Interface StoredProcessBaseInterface

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
StoredProcess2Interface, StoredProcessInterface

public interface StoredProcessBaseInterface
extends java.rmi.Remote

This interface describes various common aspects of the stored process service object.

Since:
9.2

Field Summary
static int SERVER_TYPE_STOREDPROCESS
          Stored Process Server.
static int SERVER_TYPE_WORKSPACE
          Workspace Server.
 
Method Summary
 boolean addInputStream(java.lang.String streamKey)
          Adds an input stream definition to the stored process.
 boolean addOutputStream(java.lang.String streamKey, boolean isMultiPass)
          Adds an output stream definition to the stored process.
 void destroy()
          Free resources allocated by the service.
 java.lang.String getDescription()
          Get the description of the stored process.
 java.lang.String getDirectory()
          Get the name of the directory containing the stored process.
 java.lang.String getFileName()
          Get the name of the stored process file - the name of the instance within the directory.
 java.lang.String[] getInputStreamNames()
          Return an array of input stream names for this stored process.
 java.lang.String getName()
          Get the name of the stored process.
 java.lang.String[] getOutputStreamNames()
          Return an array of output stream names for this stored process.
 LogicalServerInterface getServer()
          Get the the logical server the stored process runs on.
 int getServerType()
          Get the type of server that the stored process runs on.
 boolean hasParameters()
          Does the stored process have parameters?
 void setDescription(java.lang.String name)
          Set the description of the stored process.
 void setName(java.lang.String name)
          Set the name of the stored process.
 void setPrivilegedUser(java.lang.String privilegedUser)
          Set the name or key of the privileged user.
 void setSourceFromFile(java.lang.String directory, java.lang.String fileName)
          Set the name of the directory containing the stored process and the name of the file within the directory.
 

Field Detail

SERVER_TYPE_STOREDPROCESS

static final int SERVER_TYPE_STOREDPROCESS
Stored Process Server. Also see getServerType() and the newStoredProcess(SessionContextInterface, int, int) method of StoredProcessServiceInterface.

See Also:
Constant Field Values

SERVER_TYPE_WORKSPACE

static final int SERVER_TYPE_WORKSPACE
Workspace Server. Also see getServerType() and the newStoredProcess(SessionContextInterface, int, int) method of StoredProcessServiceInterface.

See Also:
Constant Field Values
Method Detail

setSourceFromFile

void setSourceFromFile(java.lang.String directory,
                       java.lang.String fileName)
                       throws java.lang.IllegalStateException,
                              java.rmi.RemoteException
Set the name of the directory containing the stored process and the name of the file within the directory. The directory should be on a file system which is accessible to the SAS server which executes the stored process.

Throws:
java.rmi.RemoteException - if a network anomaly is encountered.
java.lang.IllegalStateException -
  • if called on a stored process created from metadata
  • if destroy() has been called

getDirectory

java.lang.String getDirectory()
                              throws java.rmi.RemoteException
Get the name of the directory containing the stored process. This is the directory containing the stored process on the file system accessible to the SAS server which executes the stored process.

Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

getServerType

int getServerType()
                  throws java.rmi.RemoteException
Get the type of server that the stored process runs on.

Returns:
SERVER_TYPE_STOREDPROCESS or SERVER_TYPE_WORKSPACE
Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

getServer

LogicalServerInterface getServer()
                                 throws java.rmi.RemoteException
Get the the logical server the stored process runs on.

Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

getFileName

java.lang.String getFileName()
                             throws java.rmi.RemoteException
Get the name of the stored process file - the name of the instance within the directory. Also see getDirectory().

Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

setName

void setName(java.lang.String name)
             throws java.lang.IllegalStateException,
                    java.rmi.RemoteException
Set the name of the stored process.

Throws:
java.rmi.RemoteException - if a network anomaly is encountered.
java.lang.IllegalStateException -
  • if called on a stored process created from metadata
  • if destroy() has been called

getName

java.lang.String getName()
                         throws java.rmi.RemoteException
Get the name of the stored process.

Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

setDescription

void setDescription(java.lang.String name)
                    throws java.lang.IllegalStateException,
                           java.rmi.RemoteException
Set the description of the stored process.

Throws:
java.rmi.RemoteException - if a network anomaly is encountered.
java.lang.IllegalStateException -
  • if called on a stored process created from metadata
  • if destroy() has been called

getDescription

java.lang.String getDescription()
                                throws java.rmi.RemoteException
Get the description of the stored process.

Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

setPrivilegedUser

void setPrivilegedUser(java.lang.String privilegedUser)
                       throws java.rmi.RemoteException
Set the name or key of the privileged user. If set, the privileged user name is passed to the Connection Service to configure a connection factory.

Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

hasParameters

boolean hasParameters()
                      throws java.rmi.RemoteException
Does the stored process have parameters?

Returns:
true if the stored process has parameters; false if it does not
Throws:
java.lang.IllegalStateException - if destroy() has been called.
java.rmi.RemoteException - if a network anomaly is encountered.

addInputStream

boolean addInputStream(java.lang.String streamKey)
                       throws java.rmi.RemoteException,
                              java.lang.IllegalStateException
Adds an input stream definition to the stored process. The client reads from the input stream which provides a channel for the output of the stored process.

Input streams and output streams use the same fileref namespace.

Parameters:
streamKey - see sub-class for detailed information.
Returns:
true if the name was not present; false if it was with the same options.
Throws:
java.rmi.RemoteException
java.lang.IllegalStateException

getInputStreamNames

java.lang.String[] getInputStreamNames()
                                       throws java.rmi.RemoteException,
                                              java.lang.IllegalStateException
Return an array of input stream names for this stored process.

Throws:
java.rmi.RemoteException - if a network anomaly is encountered.
java.lang.IllegalStateException - if the stored process runs on a WorkspaceServer or if destroy() has been called.

addOutputStream

boolean addOutputStream(java.lang.String streamKey,
                        boolean isMultiPass)
                        throws java.rmi.RemoteException,
                               java.lang.IllegalStateException
Adds an output stream definition to the stored process. The client writes to the output stream thereby providing input to the stored process.

Input streams and output streams use the same fileref namespace.

Parameters:
streamKey - name of the output stream (must be a valid SAS fileref name)
isMultiPass - whether the stream supports multi-pass reads. Required when the stored process needs to make multiple passes over the data.
Returns:
true if the name was not present; false if it was with the same options.
Throws:
java.rmi.RemoteException - if a network anomaly is encountered.
java.lang.IllegalStateException -
  • if the name is not a valid SAS fileref name
  • if the name has been specified before with a different set of options
  • if the name has already been defined as an input stream
  • if the server type is not SERVER_TYPE_STOREDPROCESS
  • if destroy() has been called

getOutputStreamNames

java.lang.String[] getOutputStreamNames()
                                        throws java.rmi.RemoteException,
                                               java.lang.IllegalStateException
Return an array of output stream names for this stored process.

Throws:
java.rmi.RemoteException - if a network anomaly is encountered.
java.lang.IllegalStateException - if the stored process runs on a WorkspaceServer or if destroy() has been called.

destroy

void destroy()
             throws java.rmi.RemoteException
Free resources allocated by the service. This method is called after there is no further use for this object and results in resource cleanup. If the execute() method is called on a sub-class of this interface, this method may be called any time after the call to execute returns and there is no need to wait for execution to complete. Once destroy() is called, calling any other methods of this interface will result in an IllegalStateException.

Throws:
java.rmi.RemoteException - if a network anomaly is encountered.
java.lang.IllegalStateException - if this method is called a second time.

***  This interface provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.