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 Form| Modifier 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, suspendChangeManagersourceauthor, 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, titleNameAUTHOR, 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_NAMEINFOBUS_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, suspendChangeManageraddCommand, 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, setTitleNameaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, suspendPropertyChangeEventsgetClassName, getPresentationString, getTransferData, getTransferDataFlavors, isDataFlavorSupported, lostOwnership, setClassName, setCreationDategetNiceVersionclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitsetNameaddDataItemChangeListener, removeDataItemChangeListenerdestroyControllergetAuthor, 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, setTitleNamereleasegetCommands, getPersistentObjectNamesaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeArray, getPropertyChangeListenerArray, getPropertyChangeListenerArray, isPropertyChangeEventSuspended, removePropertyChangeListener, removePropertyChangeListener, setSource, suspendPropertyChangeEventsaddVetoableChangeListener, addVetoableChangeListener, getVetoableChangeArray, getVetoableChangeListenerArray, getVetoableChangeListenerArray, removeVetoableChangeListener, removeVetoableChangeListeneraddCommand, addCommand, addToGroup, addToGroup, clearCommands, commandsAvailable, deleteGroup, getCommand, getCommands, getGroup, groupExists, removeCommand, removeFromGroup, setCommandsgetPresentationStringpublic 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()
FwkInterfacegetVersion in interface FwkInterfacegetVersion in class FwkItempublic static FwkDescriptionInterface getDescriptor()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic java.lang.String getConnectionDate()
public long getConnectionTime()
public java.lang.String getConnectionDate(java.lang.String formatString)
formatString - The date format string#java.text.SimpleDateFormatpublic void close()
throws FwkException
close in interface OdsxSessionInterfaceFwkExceptionpublic boolean isTheSame(AoSession aoSession)
isTheSame in interface OdsxSessionInterfaceaoSession - theAoSessionpublic boolean isTheSame(OdsxPresentableElementInterface elem)
elem - The element to be compared topublic java.lang.String getAuthentication()
getAuthentication in interface OdsxSessionInterfacepublic java.lang.String getName()
getName in interface FwkDescriptionInterfacegetName in interface OdsxSessionInterfacegetName in class FwkItemFwkPersistence.setName(String)public java.lang.String getOptions()
getOptions in interface OdsxSessionInterfacepublic java.lang.String getSessionOptions()
getSessionOptions in interface OdsxSessionInterfacepublic java.lang.String getServiceOptions()
getServiceOptions in interface OdsxSessionInterfacepublic java.lang.String getPlumName()
getPlumName in interface OdsxSessionInterfacepublic java.lang.String getServiceName()
getServiceName in interface OdsxSessionInterfacepublic boolean isValid()
isValid in interface OdsxSessionInterfacepublic boolean wasCancelled()
wasCancelled in interface OdsxSessionInterfacepublic boolean hasPermissions()
hasPermissions in interface OdsxSessionInterfacepublic AoService getService() throws FwkException
getService in interface OdsxSessionInterfaceFwkExceptionpublic AoSession getSession() throws FwkException
getSession in interface OdsxSessionInterfaceFwkExceptionpublic AoSession getCheckedSession() throws FwkException
getCheckedSession in interface OdsxSessionInterfaceFwkExceptionAoFactory#getCheckedSessionpublic java.lang.String getSessionName()
getSessionName in interface OdsxSessionInterfacepublic 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 OdsxSessionInterfaceauthentication - The authentication information.public void setSessionOptions(java.lang.String options)
setSessionOptions in interface OdsxSessionInterfaceoptions - The session options.public void setSessionOptions(java.lang.String options,
java.lang.String authentication)
setSessionOptions in interface OdsxSessionInterfaceoptions - The session options.authentication - The authentication string.public void setServiceOptions(java.lang.String options)
setServiceOptions in interface OdsxSessionInterfaceoptions - The service options.public void setPlumName(java.lang.String plumName)
setPlumName in interface OdsxSessionInterfaceplumName - The plugable component name.public void setServiceName(java.lang.String serviceName)
setServiceName in interface OdsxSessionInterfaceserviceName - The service name.public void setSessionName(java.lang.String sessionName)
setSessionName in interface OdsxSessionInterfacesessionName - The session name.public java.lang.String toString()
toString in class FwkDescriptionpublic java.lang.String getValueAsString()
getValueAsString in interface javax.infobus.ImmediateAccesspublic java.lang.Object getValueAsObject()
getValueAsObject in interface javax.infobus.ImmediateAccesspublic void setValue(java.lang.Object object)
setValue in interface javax.infobus.ImmediateAccesspublic void addExecuteStateListener(FwkExecuteStateListenerInterface l)
addExecuteStateListener in interface OdsxSessionInterfacel - The listener.public void removeExecuteStateListener(FwkExecuteStateListenerInterface l)
removeExecuteStateListener in interface OdsxSessionInterfacel - The listener.public void fireExecuteStateEvent(FwkExecuteStateEventInterface event)
fireExecuteStateEvent in interface OdsxSessionInterfaceevent - The event to be fired.public java.lang.String getPresentationString(java.util.Locale locale)
getPresentationString in interface FwkDescriptionInterfacegetPresentationString in interface FwkPresentationInterfacegetPresentationString in interface javax.infobus.ImmediateAccessgetPresentationString in class FwkDescriptionlocale - The Locale object or null.public static void main(java.lang.String[] args)