*** This interface provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.storedprocess
Interface StoredProcessBaseInterface
- All Superinterfaces:
Remote
- All Known Subinterfaces:
StoredProcess2Interface,StoredProcessInterface
@SASScope("ALL")
@BinaryCompatibilityOnly
public interface StoredProcessBaseInterface
extends Remote
This interface describes various common aspects of the stored process service object.
- Since:
- 9.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intStored Process Server.static final intWorkspace Server. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddInputStream(String streamKey) Adds an input stream definition to the stored process.booleanaddOutputStream(String streamKey, boolean isMultiPass) Adds an output stream definition to the stored process.voiddestroy()Free resources allocated by the service.StringGet the description of the stored process.StringGet the name of the directory containing the stored process.StringGet the name of the stored process file - the name of the instance within the directory.String[]Return an array of input stream names for this stored process.StringgetName()Get the name of the stored process.String[]Return an array of output stream names for this stored process.Get the the logical server the stored process runs on.intGet the type of server that the stored process runs on.booleanDoes the stored process have parameters?voidsetDescription(String name) Set the description of the stored process.voidsetName(String name) Set the name of the stored process.voidsetPrivilegedUser(String privilegedUser) Set the name or key of the privileged user.voidsetSourceFromFile(String directory, String fileName) Set the name of the directory containing the stored process and the name of the file within the directory.
-
Field Details
-
SERVER_TYPE_STOREDPROCESS
static final int SERVER_TYPE_STOREDPROCESSStored Process Server. Also seegetServerType()and thenewStoredProcess(SessionContextInterface, int, int)method of StoredProcessServiceInterface.- See Also:
-
SERVER_TYPE_WORKSPACE
static final int SERVER_TYPE_WORKSPACEWorkspace Server. Also seegetServerType()and thenewStoredProcess(SessionContextInterface, int, int)method of StoredProcessServiceInterface.- See Also:
-
-
Method Details
-
setSourceFromFile
void setSourceFromFile(String directory, String fileName) throws IllegalStateException, 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:
RemoteException- if a network anomaly is encountered.IllegalStateException-- if called on a stored process created from metadata
- if destroy() has been called
-
getDirectory
String getDirectory() throws RemoteExceptionGet 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:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
getServerType
int getServerType() throws RemoteExceptionGet the type of server that the stored process runs on.- Returns:
SERVER_TYPE_STOREDPROCESSorSERVER_TYPE_WORKSPACE- Throws:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
getServer
Get the the logical server the stored process runs on.- Throws:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
getFileName
String getFileName() throws RemoteExceptionGet the name of the stored process file - the name of the instance within the directory. Also seegetDirectory().- Throws:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
setName
void setName(String name) throws IllegalStateException, RemoteException Set the name of the stored process.- Throws:
RemoteException- if a network anomaly is encountered.IllegalStateException-- if called on a stored process created from metadata
- if destroy() has been called
-
getName
String getName() throws RemoteExceptionGet the name of the stored process.- Throws:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
setDescription
void setDescription(String name) throws IllegalStateException, RemoteException Set the description of the stored process.- Throws:
RemoteException- if a network anomaly is encountered.IllegalStateException-- if called on a stored process created from metadata
- if destroy() has been called
-
getDescription
String getDescription() throws RemoteExceptionGet the description of the stored process.- Throws:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
setPrivilegedUser
void setPrivilegedUser(String privilegedUser) throws 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:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
hasParameters
boolean hasParameters() throws RemoteExceptionDoes the stored process have parameters?- Returns:
- true if the stored process has parameters; false if it does not
- Throws:
IllegalStateException- if destroy() has been called.RemoteException- if a network anomaly is encountered.
-
addInputStream
boolean addInputStream(String streamKey) throws RemoteException, 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:
RemoteExceptionIllegalStateException
-
getInputStreamNames
String[] getInputStreamNames() throws RemoteException, IllegalStateExceptionReturn an array of input stream names for this stored process.- Throws:
RemoteException- if a network anomaly is encountered.IllegalStateException- if the stored process runs on a WorkspaceServer or if destroy() has been called.
-
addOutputStream
boolean addOutputStream(String streamKey, boolean isMultiPass) throws RemoteException, 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:
RemoteException- if a network anomaly is encountered.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
String[] getOutputStreamNames() throws RemoteException, IllegalStateExceptionReturn an array of output stream names for this stored process.- Throws:
RemoteException- if a network anomaly is encountered.IllegalStateException- if the stored process runs on a WorkspaceServer or if destroy() has been called.
-
destroy
void destroy() throws RemoteExceptionFree 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 anIllegalStateException.- Throws:
RemoteException- if a network anomaly is encountered.IllegalStateException- if this method is called a second time.
-