public class OdsxSession extends FwkItem implements OdsxSessionInterface
public static void main (String args[]) { // Initialize the framework. FwkContainer.initialize(args); // Create the session object. OdsxSession session = new OdsxSession(); // Set the servicename coming from the ATHOS_INI. session.setServiceName("ATF/File"); // Set the plugable component service class. session.setPlumName("com.highqsoft.ods.athos.AoService"); // Set the service options. session.setServiceOptions("INIFILE=ATHOS_INI"); // Set the filename as an atuthentication string. session.setAuthentication(session.getAuthentication()+" Filename=d:\\discher.atf"); // Print out the session settings. System.out.println (session); // Get the ASAM ODS session. AoSession aoSession = session.getSession(); }For a CORBA connection use the following code.
public static void main (String args[]) { // Initialize the framework. FwkContainer.initialize(args); // Create the session object. OdsxSession session = new OdsxSession(); // Set the servicename coming from the NameService. session.setServiceName("ZEUS/DB"); // Set the plugable component service class. session.setPlumName("com.highqsoft.ods.corba.AoService"); // Set the service options. session.setServiceOptions("NameServicePort=900, NameServiceHost=Robinson"); // Set the filename as an atuthentication string. session.setAuthentication("USER=zeus, PASSWORD=zeus"); // Print out the session settings. System.out.println (session); // Get the ASAM ODS session. AoSession aoSession = session.getSession(); }
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected boolean |
cancelled |
protected java.util.Date |
connectionDate |
protected static FwkDescriptionInterface |
descriptor |
protected java.util.Vector<FwkExecuteStateListenerInterface> |
listeners |
static java.lang.String |
version |
changeManager, properties, suspendChangeManager
source
author, buildnr, className, company, copyright, creationDate, dateFormatString, description, eMail, FWK_ICON, FWK_ICON_ARRAY, FWK_ICON_BG, FWK_ICON_BG_ARRAY, FWK_ICON_BG_LARGE, FWK_ICON_BG_LARGE_ARRAY, FWK_ICON_LARGE, FWK_ICON_LARGE_ARRAY, icon, ICON, iconCount, iconKey, internetAddress, name, titleName
AUTHOR, BUILDNR, COMPANY, COPYRIGHT, DATE_FORMAT, DEFAULT_ICON, DESCRIPTION, INTERNET, LARGE_ICON, LARGE_KEY_EXT, LARGE_OPAQUE_ICON, LARGE_OPAQUE_KEY_EXT, OPAQUE_ICON, OPAQUE_KEY_EXT, RCS_DATE_FORMAT, SUPPORT_EMAIL, TITLE_NAME
INFOBUS_SOURCE
Constructor and Description |
---|
OdsxSession()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addExecuteStateListener(FwkExecuteStateListenerInterface l)
Add an execution state listener.
|
void |
close()
Close the session to an ODS server.
|
protected void |
finalize()
The finalization.
|
void |
fireExecuteStateEvent(FwkExecuteStateEventInterface event)
Fire an execute state event.
|
java.lang.String |
getAuthentication()
This method returns the authentication information of the session.
|
AoSession |
getCheckedSession()
This method returns the ASAM-ODS session.
|
java.lang.String |
getConnectionDate()
Get the connection date.
|
java.lang.String |
getConnectionDate(java.lang.String formatString)
Get the connection date.
|
long |
getConnectionTime()
Get the connection time.
|
static FwkDescriptionInterface |
getDescriptor() |
java.lang.String |
getName()
This method returns the name of the session.
|
java.lang.String |
getOptions()
This method returns the options of the session.
|
java.lang.String |
getPlumName()
This method returns the name of the plugable Asam component.
|
java.lang.String |
getPresentationString(java.util.Locale locale)
Retrieves the representation string.
|
AoService |
getService()
This method returns the ASAM-ODS service.
|
java.lang.String |
getServiceName()
This method returns the service name of the session.
|
java.lang.String |
getServiceOptions()
This method returns the options of the service.
|
AoSession |
getSession()
This method returns the ASAM-ODS session.
|
java.lang.String |
getSessionName()
This method returns the unique name of the session.
|
java.lang.String |
getSessionOptions()
This method returns the options of the session.
|
java.lang.Object |
getValueAsObject()
Returns the org.asam.ods.AoSession
|
java.lang.String |
getValueAsString()
Get the value as a string.
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
boolean |
hasPermissions()
Test the permissions.
|
boolean |
isTheSame(AoSession aoSession)
Return a boolean whether the given AoSession is equal to this one.
|
boolean |
isTheSame(OdsxPresentableElementInterface elem)
Return a boolean whether the given element is the element as the incoming one.
|
boolean |
isValid()
Test the ASAM-ODS session.
|
static void |
main(java.lang.String[] args)
The main test procedure.
|
void |
removeExecuteStateListener(FwkExecuteStateListenerInterface l)
Remove an execution state listener.
|
void |
setAuthentication(java.lang.String authentication)
This method sets the authentication information of the session.
|
void |
setPlumName(java.lang.String plumName)
This method sets the plugable component name of the session.
|
void |
setServiceName(java.lang.String serviceName)
This method sets the name of the service to which the
session belongs.
|
void |
setServiceOptions(java.lang.String options)
This method sets the options of the service.
|
void |
setSessionName(java.lang.String sessionName)
This method sets the name of the session.
|
void |
setSessionOptions(java.lang.String options)
This method sets the options of the session.
|
void |
setSessionOptions(java.lang.String options,
java.lang.String authentication)
This method sets the options of the session.
|
void |
setValue(java.lang.Object object)
This method is required for infobus suport,
but it doesn't make sense for this object.
|
java.lang.String |
toString()
Returns a string presentation of the session.
|
boolean |
wasCancelled()
Test the ASAM-ODS session whether it was canceled by the user.
|
addDataItemChangeListener, fireItemAdded, fireItemDeleted, fireItemRevoked, fireItemValueChanged, getProperty, getPropertyGroup, getSource, isChangeManagerSuspended, release, removeDataItemChangeListener, setName, setProperty, setPropertyGroup, suspendChangeManager
addCommand, addCommand, addToGroup, addToGroup, addVetoableChangeListener, addVetoableChangeListener, clearCommands, commandsAvailable, compareTo, deleteGroup, destroyController, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getAuthor, getBuild, getCommand, getCommands, getCommands, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getFwkMimeTypes, getGroup, getIcon, getIcon, getIconKey, getIconKey, getPersistentObjectNames, getSupportEMail, getTitle, getTitleName, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, groupExists, removeCommand, removeFromGroup, removeVetoableChangeListener, removeVetoableChangeListener, setAuthor, setBuild, setCommands, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setDateFormatString, setDescription, setDescriptor, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setSource, setSupportEMail, setTitleName
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEvents
getClassName, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDate
getNiceVersion
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
setName
addDataItemChangeListener, removeDataItemChangeListener
destroyController
getAuthor, getBuild, getClassName, getCompany, getCompanyInternetAddress, getCopyright, getCreationDate, getCreationDate, getDateFormatString, getDescription, getIcon, getIcon, getIconKey, getIconKey, getPresentationString, getSupportEMail, getTitle, getTitleName, setAuthor, setBuild, setClassName, setCompany, setCompanyInternetAddress, setCopyright, setCreationDate, setCreationDate, setDateFormatString, setDescription, setDescriptor, setIcon, setIcon, setIconKey, setIconKey, setSupportEMail, setTitleName
release
getCommands, getPersistentObjectNames
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEvents
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListener
addCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommands
getPresentationString
public static final java.lang.String version
protected static final FwkDescriptionInterface descriptor
protected java.util.Vector<FwkExecuteStateListenerInterface> listeners
protected boolean cancelled
protected java.util.Date connectionDate
public java.lang.String getVersion()
FwkInterface
getVersion
in interface FwkInterface
getVersion
in class FwkItem
public static FwkDescriptionInterface getDescriptor()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String getConnectionDate()
public long getConnectionTime()
public java.lang.String getConnectionDate(java.lang.String formatString)
formatString
- The date format string#java.text.SimpleDateFormat
public void close() throws FwkException
close
in interface OdsxSessionInterface
FwkException
public boolean isTheSame(AoSession aoSession)
isTheSame
in interface OdsxSessionInterface
aoSession
- theAoSessionpublic boolean isTheSame(OdsxPresentableElementInterface elem)
elem
- The element to be compared topublic java.lang.String getAuthentication()
getAuthentication
in interface OdsxSessionInterface
public java.lang.String getName()
getName
in interface FwkDescriptionInterface
getName
in interface OdsxSessionInterface
getName
in class FwkItem
FwkPersistence.setName(String)
public java.lang.String getOptions()
getOptions
in interface OdsxSessionInterface
public java.lang.String getSessionOptions()
getSessionOptions
in interface OdsxSessionInterface
public java.lang.String getServiceOptions()
getServiceOptions
in interface OdsxSessionInterface
public java.lang.String getPlumName()
getPlumName
in interface OdsxSessionInterface
public java.lang.String getServiceName()
getServiceName
in interface OdsxSessionInterface
public boolean isValid()
isValid
in interface OdsxSessionInterface
public boolean wasCancelled()
wasCancelled
in interface OdsxSessionInterface
public boolean hasPermissions()
hasPermissions
in interface OdsxSessionInterface
public AoService getService() throws FwkException
getService
in interface OdsxSessionInterface
FwkException
public AoSession getSession() throws FwkException
getSession
in interface OdsxSessionInterface
FwkException
public AoSession getCheckedSession() throws FwkException
getCheckedSession
in interface OdsxSessionInterface
FwkException
AoFactory#getCheckedSession
public java.lang.String getSessionName()
getSessionName
in interface OdsxSessionInterface
public void setAuthentication(java.lang.String authentication)
The method will ask for a password by default if the parameter is null.
If the environment doesn't need passwords, the boolean property keyword
Odsx.NewSession.AskForPassword
give a possibility to omit the password dialog.
If the property value is false the dialog will not appear.
For all other values the listener will ask for password.
setAuthentication
in interface OdsxSessionInterface
authentication
- The authentication information.public void setSessionOptions(java.lang.String options)
setSessionOptions
in interface OdsxSessionInterface
options
- The session options.public void setSessionOptions(java.lang.String options, java.lang.String authentication)
setSessionOptions
in interface OdsxSessionInterface
options
- The session options.authentication
- The authentication string.public void setServiceOptions(java.lang.String options)
setServiceOptions
in interface OdsxSessionInterface
options
- The service options.public void setPlumName(java.lang.String plumName)
setPlumName
in interface OdsxSessionInterface
plumName
- The plugable component name.public void setServiceName(java.lang.String serviceName)
setServiceName
in interface OdsxSessionInterface
serviceName
- The service name.public void setSessionName(java.lang.String sessionName)
setSessionName
in interface OdsxSessionInterface
sessionName
- The session name.public java.lang.String toString()
toString
in class FwkDescription
public java.lang.String getValueAsString()
getValueAsString
in interface javax.infobus.ImmediateAccess
public java.lang.Object getValueAsObject()
getValueAsObject
in interface javax.infobus.ImmediateAccess
public void setValue(java.lang.Object object)
setValue
in interface javax.infobus.ImmediateAccess
public void addExecuteStateListener(FwkExecuteStateListenerInterface l)
addExecuteStateListener
in interface OdsxSessionInterface
l
- The listener.public void removeExecuteStateListener(FwkExecuteStateListenerInterface l)
removeExecuteStateListener
in interface OdsxSessionInterface
l
- The listener.public void fireExecuteStateEvent(FwkExecuteStateEventInterface event)
fireExecuteStateEvent
in interface OdsxSessionInterface
event
- The event to be fired.public java.lang.String getPresentationString(java.util.Locale locale)
getPresentationString
in interface FwkDescriptionInterface
getPresentationString
in interface FwkPresentationInterface
getPresentationString
in interface javax.infobus.ImmediateAccess
getPresentationString
in class FwkDescription
locale
- The Locale object or null.public static void main(java.lang.String[] args)