public class AoSession extends java.lang.Object implements AoSession
Modifier and Type | Field and Description |
---|---|
protected long |
cObjPtr |
protected static java.util.Vector<ODSReadTransfer> |
openReads |
protected static java.util.Vector<ODSWriteTransfer> |
openWrites |
protected static java.util.HashMap<java.lang.Integer,java.util.Vector<FileTransactionEntry>> |
sessionOpenTransactions |
Modifier and Type | Method and Description |
---|---|
org.omg.CORBA.Request |
_create_request(org.omg.CORBA.Context ctx,
java.lang.String operation,
org.omg.CORBA.NVList arg_list,
org.omg.CORBA.NamedValue result) |
org.omg.CORBA.Request |
_create_request(org.omg.CORBA.Context ctx,
java.lang.String operation,
org.omg.CORBA.NVList arg_list,
org.omg.CORBA.NamedValue result,
org.omg.CORBA.ExceptionList exclist,
org.omg.CORBA.ContextList ctxlist) |
org.omg.CORBA.Object |
_duplicate() |
org.omg.CORBA.DomainManager[] |
_get_domain_managers() |
org.omg.CORBA.Object |
_get_interface_def() |
org.omg.CORBA.Policy |
_get_policy(int policy_type) |
int |
_hash(int maximum) |
boolean |
_is_a(java.lang.String repositoryIdentifier) |
boolean |
_is_equivalent(org.omg.CORBA.Object other) |
boolean |
_non_existent() |
void |
_release() |
org.omg.CORBA.Request |
_request(java.lang.String operation) |
org.omg.CORBA.Object |
_set_policy_override(org.omg.CORBA.Policy[] policies,
org.omg.CORBA.SetOverrideType set_add) |
void |
abortTransaction()
Abort (rollback) a transaction.
|
boolean |
addFileTransactionEntry(FileTransactionEntry ft)
Add a file transaction to the list of transactions.
|
void |
addReadTransfer(ODSReadTransfer odsReadTransfer)
Add the read transfer to the list of open read transfer for this session.
|
void |
addWriteTransfer(ODSWriteTransfer odsWriteTransfer)
Add the write transfer to the list of open write transfer for this session.
|
boolean |
checkWrite(java.lang.String filename)
Check if the file use used by this session for write transfer.
|
void |
close()
Close session to an ASAM-ODS server.
|
void |
commitTransaction()
Commit a transaction.
|
Blob |
createBlob()
Create a new object with the Interface Blob on the server.
|
AoSession |
createCoSession()
Create a co-session.
|
QueryEvaluator |
createQueryEvaluator()
Create a QueryEvaluator object.
|
boolean |
equals(java.lang.Object obj) |
protected void |
finalize() |
void |
flush()
Make the changes permanent.
|
ApplElemAccess |
getApplElemAccess()
Get the application element access object from the current
session.
|
ApplicationStructure |
getApplicationStructure()
Get the application structure from the current session.
|
ApplicationStructureValue |
getApplicationStructureValue()
Get the application structure as values from the current
session.
|
BaseStructure |
getBaseStructure()
Get the base structure from the current session.
|
NameValueIterator |
getContext(java.lang.String varPattern)
Get context variables from the session.
|
NameValue |
getContextByName(java.lang.String varName)
Get a context variable by its name from the session.
|
java.lang.String |
getDescription()
Get the description of the ASAM-ODS session.The
description of the session is identical with description
of the ASAM-ODS factory.
|
EnumerationAttributeStructure[] |
getEnumerationAttributes()
Get the list with the attributes of all elements and the enumeration
name which has an enumeration.
|
EnumerationStructure[] |
getEnumerationStructure()
Get all enumerations used in the application model.
|
int |
getId()
Get the id of the ASAM-ODS session.
|
short |
getLockMode()
Get the current lock mode.
|
java.lang.String |
getName()
Get the name of the ASAM-ODS session.
|
java.lang.String |
getType()
Get the type of the ASAM-ODS session.
|
InstanceElement |
getUser()
Returns the instance element of the user logged in, this is the
instance element from the application element derived from AoUser,
with the name given in s given in the 'auth' parameter of the method
newSession at the interface AoFactory (variable USER).
|
NameIterator |
listContext(java.lang.String varPattern)
List the names of context variables from the session.
|
void |
nativeAbortTransaction() |
void |
nativeClose() |
void |
nativeCommitTransaction() |
void |
nativeStartTransaction() |
void |
removeContext(java.lang.String varPattern)
Remove context variables from the session.
|
void |
removeReadTransfer(ODSReadTransfer odsReadTransfer)
Remove the read transfer from the list of open read transfers.
|
void |
removeWriteTransfer(ODSWriteTransfer odsWriteTransfer)
Remove the write transfer from the list of write read transfers.
|
void |
setContext(NameValue contextVariable)
Set/modify a known context variable or add a new context
variable to the session.
|
void |
setContextString(java.lang.String varName,
java.lang.String value)
Set/modify a known context variable or add a new context
variable to the session.
|
void |
setCurrentInitialRights(InitialRight[] irlEntries,
boolean set)
Every new created instance will set its initial rights to
<acl> .
|
void |
setLockMode(short lockMode)
Set the new lock mode.
|
void |
setPassword(java.lang.String username,
java.lang.String oldPassword,
java.lang.String newPassword)
Change the password for user defined by
|
void |
startTransaction()
Start a transaction on the physical storage system (e.g.
|
protected long cObjPtr
protected static java.util.Vector<ODSReadTransfer> openReads
protected static java.util.Vector<ODSWriteTransfer> openWrites
protected static java.util.HashMap<java.lang.Integer,java.util.Vector<FileTransactionEntry>> sessionOpenTransactions
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void abortTransaction() throws AoException
abortTransaction
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_NOT_ACTIVEpublic void nativeAbortTransaction() throws AoException
AoException
public void close() throws AoException
close
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic void nativeClose() throws AoException
AoException
public void commitTransaction() throws AoException
commitTransaction
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_NOT_ACTIVEpublic void nativeCommitTransaction() throws AoException
AoException
public ApplicationStructure getApplicationStructure() throws AoException
getApplicationStructure
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic AoSession createCoSession() throws AoException
createCoSession
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_CONNECTION_LOST AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED AO_NO_MEMORY AO_ACCESS_DENIEDpublic ApplicationStructureValue getApplicationStructureValue() throws AoException
getApplicationStructureValue
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic BaseStructure getBaseStructure() throws AoException
getBaseStructure
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic NameValueIterator getContext(java.lang.String varPattern) throws AoException
getContext
in interface AoSessionOperations
varPattern
- The name or the search pattern for the
context variable(s).AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_FOUND
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic NameValue getContextByName(java.lang.String varName) throws AoException
getContextByName
in interface AoSessionOperations
varName
- The name of the requested context
variable.AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_FOUND
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic InstanceElement getUser() throws AoException
getUser
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORYpublic NameIterator listContext(java.lang.String varPattern) throws AoException
listContext
in interface AoSessionOperations
varPattern
- The name or the search pattern for the
context variable(s).AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NOT_FOUND
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic void removeContext(java.lang.String varPattern) throws AoException
removeContext
in interface AoSessionOperations
varPattern
- The name or the search pattern for the
context variable(s) to be removed.AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NOT_FOUND
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic void setContext(NameValue contextVariable) throws AoException
setContext
in interface AoSessionOperations
contextVariable
- The context variable.AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic void setContextString(java.lang.String varName, java.lang.String value) throws AoException
setContextString
in interface AoSessionOperations
varName
- The name of the context variable.value
- The value of the context variable.AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic void startTransaction() throws AoException
startTransaction
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_ALREADY_ACTIVEpublic void nativeStartTransaction() throws AoException
AoException
public void flush() throws AoException
flush
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_ALREADY_ACTIVEpublic void setCurrentInitialRights(InitialRight[] irlEntries, boolean set) throws AoException
setCurrentInitialRights
in interface AoSessionOperations
irlEntries
- The current initial rights.set
- Set (1) or remove (0) the current initial
rights. The previous initial rights get lost.
If the parameter set is 0 (remove) the
parameter irlEntries will be ignored.AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_NOT_ACTIVEpublic short getLockMode() throws AoException
getLockMode
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_NOT_ACTIVEpublic void setLockMode(short lockMode) throws AoException
setLockMode
in interface AoSessionOperations
lockMode
- The new lock mode. The lock mode
constants are defined in the interface
LockMode. The interface definition
language IDL does not allow to set the
values of enumerations thus the constant
definitions had to be done in an
interface.AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_NOT_ACTIVEpublic ApplElemAccess getApplElemAccess() throws AoException
getApplElemAccess
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic void setPassword(java.lang.String username, java.lang.String oldPassword, java.lang.String newPassword) throws AoException
setPassword
in interface AoSessionOperations
username
- The name of the user for which the
password will be changed. If no username
is given the password of the current
user will be changed. If the username
differs from the current user the
current user must be a superuser.oldPassword
- The current password of the user. A
normal user must supply his current
password. The superuser can change
the password without supplying the
current password.newPassword
- The new password of the user.AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_TRANSACTION_NOT_ACTIVE
AO_WRONG_PASSWORDpublic java.lang.String getDescription() throws AoException
getDescription
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_CONNECTION_LOSTpublic java.lang.String getName() throws AoException
getName
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_CONNECTION_LOSTpublic int getId() throws AoException
getId
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_CONNECTION_LOSTpublic java.lang.String getType() throws AoException
getType
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVE
AO_CONNECTION_LOSTpublic QueryEvaluator createQueryEvaluator() throws AoException
createQueryEvaluator
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_ACCESS_DENIED
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic Blob createBlob() throws AoException
createBlob
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_BAD_PARAMETER
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic EnumerationAttributeStructure[] getEnumerationAttributes() throws AoException
getEnumerationAttributes
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEpublic EnumerationStructure[] getEnumerationStructure() throws AoException
getEnumerationStructure
in interface AoSessionOperations
AoException
- with the following possible error codes:
AO_CONNECTION_LOST
AO_IMPLEMENTATION_PROBLEM
AO_NOT_IMPLEMENTED
AO_NO_MEMORY
AO_SESSION_NOT_ACTIVEprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public boolean addFileTransactionEntry(FileTransactionEntry ft) throws AoException
ft
- the file transaction.AoException
- any occurring ASAM ODS exception.public void addReadTransfer(ODSReadTransfer odsReadTransfer)
odsReadTransfer
- the read transferpublic void removeReadTransfer(ODSReadTransfer odsReadTransfer)
odsReadTransfer
- the read transfer.public void addWriteTransfer(ODSWriteTransfer odsWriteTransfer)
odsWriteTransfer
- the write transferpublic void removeWriteTransfer(ODSWriteTransfer odsWriteTransfer)
odsWriteTransfer
- teh write transfer.public boolean checkWrite(java.lang.String filename)
filename
- the filenamepublic org.omg.CORBA.Request _create_request(org.omg.CORBA.Context ctx, java.lang.String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result)
_create_request
in interface org.omg.CORBA.Object
public org.omg.CORBA.Request _create_request(org.omg.CORBA.Context ctx, java.lang.String operation, org.omg.CORBA.NVList arg_list, org.omg.CORBA.NamedValue result, org.omg.CORBA.ExceptionList exclist, org.omg.CORBA.ContextList ctxlist)
_create_request
in interface org.omg.CORBA.Object
public org.omg.CORBA.Object _duplicate()
_duplicate
in interface org.omg.CORBA.Object
public org.omg.CORBA.DomainManager[] _get_domain_managers()
_get_domain_managers
in interface org.omg.CORBA.Object
public org.omg.CORBA.Object _get_interface_def()
_get_interface_def
in interface org.omg.CORBA.Object
public org.omg.CORBA.Policy _get_policy(int policy_type)
_get_policy
in interface org.omg.CORBA.Object
public int _hash(int maximum)
_hash
in interface org.omg.CORBA.Object
public boolean _is_a(java.lang.String repositoryIdentifier)
_is_a
in interface org.omg.CORBA.Object
public boolean _is_equivalent(org.omg.CORBA.Object other)
_is_equivalent
in interface org.omg.CORBA.Object
public boolean _non_existent()
_non_existent
in interface org.omg.CORBA.Object
public void _release()
_release
in interface org.omg.CORBA.Object
public org.omg.CORBA.Request _request(java.lang.String operation)
_request
in interface org.omg.CORBA.Object
public org.omg.CORBA.Object _set_policy_override(org.omg.CORBA.Policy[] policies, org.omg.CORBA.SetOverrideType set_add)
_set_policy_override
in interface org.omg.CORBA.Object