org.sdas.core.server
Class SDASServerHandler

java.lang.Object
  extended by org.sdas.core.server.SDASServerHandler

public class SDASServerHandler
extends java.lang.Object

This class wraps all the xml-rpc methods and calls the correct methods in the association's ISDASProtocol implementation.


Constructor Summary
SDASServerHandler(ISDASProtocol serverImpl, SDASSecurity securityImpl)
          Creates a new instance of SDASServerHandler.
 
Method Summary
 java.lang.String authenticate(java.util.Hashtable<java.lang.String,java.lang.String> credentials)
          Calls the SDASSecurity.authenticate(java.lang.String[][]) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getData(java.lang.String sessionUID, java.lang.String parameterUniqueID, java.util.Hashtable event)
          Calls the ISDASProtocol.getData(String, IHEvent) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getData(java.lang.String sessionUID, java.lang.String parameterUniqueID, java.lang.String eventUniqueID, int eventNumber)
          Calls the ISDASProtocol.getData(String, String, int) implementation method and transforms the result into an array of xml-rpc IData valid structures.
 java.util.Vector getMultipleData(java.lang.String sessionUID, java.lang.String parameterUniqueID, java.lang.String eventUniqueID, java.util.Vector eventsNumber)
          Calls the ISDASProtocol.getMultipleData(String, String, int[]) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getMultipleData(java.lang.String sessionUID, java.lang.String parameterUniqueID, java.util.Vector eventsUniqueID, java.util.Vector eventsNumber)
          Calls the ISDASProtocol.getMultipleData(String, String[], int[]) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getMultipleData(java.lang.String sessionUID, java.util.Vector parametersUniqueID, java.util.Hashtable event)
          Calls the ISDASProtocol.getMultipleData(String[], IHEvent) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getMultipleData(java.lang.String sessionUID, java.util.Vector parametersUniqueID, java.lang.String eventUniqueID, int eventNumber)
          Calls the ISDASProtocol.getMultipleData(String[], String, int) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getMultipleData(java.lang.String sessionUID, java.util.Vector parametersUniqueID, java.util.Vector events)
          Calls the ISDASProtocol.getMultipleData(String[], IHEvent[]) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getMultipleData(java.lang.String sessionUID, java.util.Vector parametersUniqueID, java.util.Vector eventsUniqueID, java.util.Vector eventsNumber)
          Calls the ISDASProtocol.getMultipleData(String[], String[], int[]) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector getPluginFiles(java.lang.String sessionUID)
          Calls the ISDASProtocol.getPluginFiles() implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector logout(java.lang.String sessionUID)
          Calls the SDASSecurity#logout() implementation
 boolean parameterExists(java.lang.String sessionUID, java.lang.String parameterUniqueID, java.lang.String eventUniqueID, int eventNumber)
          Calls the ISDASProtocol.parameterExists(String, String, int) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector ping()
          Empty method.
 boolean putData(java.lang.String sessionUID, java.util.Hashtable htData)
          Calls the ISDASProtocol.putData(IData) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchDataByEvent(java.lang.String sessionUID, java.util.Hashtable event)
          Calls the ISDASProtocol.searchDataByEvent(IHEvent) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchDataByEvent(java.lang.String sessionUID, java.lang.String eventUniqueID, int eventNumber)
          Calls the ISDASProtocol.searchDataByEvent(String,int) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchDeclaredEventsByDescription(java.lang.String sessionUID, java.lang.String search)
          Calls the ISDASProtocol.searchDeclaredEventsByDescription(java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchDeclaredEventsByDescription(java.lang.String sessionUID, java.lang.String search, java.lang.String locale)
          Calls the ISDASProtocol.searchDeclaredEventsByDescription(java.lang.String,java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchDeclaredEventsByName(java.lang.String sessionUID, java.lang.String search)
          Calls the org.sdas.core.common.ISDASProtocol#searchDeclaredEventsByname(java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchDeclaredEventsByName(java.lang.String sessionUID, java.lang.String search, java.lang.String locale)
          Calls the org.sdas.core.common.ISDASProtocol#searchDeclaredEventsByname(java.lang.String,java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchDeclaredEventsByUniqueID(java.lang.String sessionUID, java.lang.String uniqueID)
          Calls the ISDASProtocol.searchDeclaredEventsByUniqueID(java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchEventsByEventNumber(java.lang.String sessionUID, int number)
          Calls the ISDASProtocol.searchEventsByEventNumber(int) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchEventsByEventTimeWindow(java.lang.String sessionUID, java.util.Hashtable tstart, java.util.Hashtable tend)
          Calls the ISDASProtocol.searchEventsByEventTimeWindow(ITimeStamp, ITimeStamp) implementation method and transforms the result into a xml-rpc valid structure.
 int searchMaxEventNumber(java.lang.String sessionUID, java.lang.String uniqueID)
          Calls the ISDASProtocol.searchMaxEventNumber(String) implementation method and transforms the result into a xml-rpc valid structure.
 int searchMinEventNumber(java.lang.String sessionUID, java.lang.String uniqueID)
          Calls the ISDASProtocol.searchMinEventNumber(String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchParametersByDescription(java.lang.String sessionUID, java.lang.String search)
          Calls the ISDASProtocol.searchParametersByDescription(String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchParametersByDescription(java.lang.String sessionUID, java.lang.String search, java.lang.String locale)
          Calls the ISDASProtocol.searchParametersByDescription(String, String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchParametersByName(java.lang.String sessionUID, java.lang.String search)
          Calls the ISDASProtocol.searchParametersByName(String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchParametersByName(java.lang.String sessionUID, java.lang.String search, java.lang.String locale)
          Calls the ISDASProtocol.searchParametersByName(String, String) implementation method and transforms the result into a xml-rpc valid structure.
 java.util.Vector searchParametersByUniqueID(java.lang.String sessionUID, java.lang.String uniqueID)
          Calls the ISDASProtocol.searchParametersByUniqueID(String) implementation method and transforms the result into a xml-rpc valid structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SDASServerHandler

public SDASServerHandler(ISDASProtocol serverImpl,
                         SDASSecurity securityImpl)
Creates a new instance of SDASServerHandler.

Parameters:
serverImpl - the ISDASProtocol implementation.
serverImpl - the org.sdas.core.common.SDASSecurity implementation.
Method Detail

ping

public java.util.Vector ping()
Empty method. It can be used to test the connection to server.

Returns:
an empty Vector.

authenticate

public java.lang.String authenticate(java.util.Hashtable<java.lang.String,java.lang.String> credentials)
Calls the SDASSecurity.authenticate(java.lang.String[][]) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
the - supplied credentials
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

logout

public java.util.Vector logout(java.lang.String sessionUID)
Calls the SDASSecurity#logout() implementation


searchDeclaredEventsByUniqueID

public java.util.Vector searchDeclaredEventsByUniqueID(java.lang.String sessionUID,
                                                       java.lang.String uniqueID)
Calls the ISDASProtocol.searchDeclaredEventsByUniqueID(java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
uniqueID - the parameter unique identifier.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchDeclaredEventsByName

public java.util.Vector searchDeclaredEventsByName(java.lang.String sessionUID,
                                                   java.lang.String search)
Calls the org.sdas.core.common.ISDASProtocol#searchDeclaredEventsByname(java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the string to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchDeclaredEventsByName

public java.util.Vector searchDeclaredEventsByName(java.lang.String sessionUID,
                                                   java.lang.String search,
                                                   java.lang.String locale)
Calls the org.sdas.core.common.ISDASProtocol#searchDeclaredEventsByname(java.lang.String,java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the string to search.
locale - the locale.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchDeclaredEventsByDescription

public java.util.Vector searchDeclaredEventsByDescription(java.lang.String sessionUID,
                                                          java.lang.String search)
Calls the ISDASProtocol.searchDeclaredEventsByDescription(java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the string to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchDeclaredEventsByDescription

public java.util.Vector searchDeclaredEventsByDescription(java.lang.String sessionUID,
                                                          java.lang.String search,
                                                          java.lang.String locale)
Calls the ISDASProtocol.searchDeclaredEventsByDescription(java.lang.String,java.lang.String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the string to search.
locale - the locale.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchEventsByEventNumber

public java.util.Vector searchEventsByEventNumber(java.lang.String sessionUID,
                                                  int number)
Calls the ISDASProtocol.searchEventsByEventNumber(int) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
number - the number to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchMaxEventNumber

public int searchMaxEventNumber(java.lang.String sessionUID,
                                java.lang.String uniqueID)
Calls the ISDASProtocol.searchMaxEventNumber(String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
uniqueID - the unique identifier to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

parameterExists

public boolean parameterExists(java.lang.String sessionUID,
                               java.lang.String parameterUniqueID,
                               java.lang.String eventUniqueID,
                               int eventNumber)
Calls the ISDASProtocol.parameterExists(String, String, int) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parameterUniqueID - the parameter unique identifier to search.
eventUniqueID - the event unique identifier to search.
eventNumber - the event number to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchMinEventNumber

public int searchMinEventNumber(java.lang.String sessionUID,
                                java.lang.String uniqueID)
Calls the ISDASProtocol.searchMinEventNumber(String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
uniqueID - the unique identifier to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchEventsByEventTimeWindow

public java.util.Vector searchEventsByEventTimeWindow(java.lang.String sessionUID,
                                                      java.util.Hashtable tstart,
                                                      java.util.Hashtable tend)
Calls the ISDASProtocol.searchEventsByEventTimeWindow(ITimeStamp, ITimeStamp) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
tstart - the time of the first sample.
tend - the time of the last sample.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchParametersByUniqueID

public java.util.Vector searchParametersByUniqueID(java.lang.String sessionUID,
                                                   java.lang.String uniqueID)
Calls the ISDASProtocol.searchParametersByUniqueID(String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
uniqueID - the unique identifier to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchParametersByName

public java.util.Vector searchParametersByName(java.lang.String sessionUID,
                                               java.lang.String search)
Calls the ISDASProtocol.searchParametersByName(String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the name to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchParametersByName

public java.util.Vector searchParametersByName(java.lang.String sessionUID,
                                               java.lang.String search,
                                               java.lang.String locale)
Calls the ISDASProtocol.searchParametersByName(String, String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the name to search.
locale - the locale.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchParametersByDescription

public java.util.Vector searchParametersByDescription(java.lang.String sessionUID,
                                                      java.lang.String search)
Calls the ISDASProtocol.searchParametersByDescription(String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the description to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchParametersByDescription

public java.util.Vector searchParametersByDescription(java.lang.String sessionUID,
                                                      java.lang.String search,
                                                      java.lang.String locale)
Calls the ISDASProtocol.searchParametersByDescription(String, String) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
search - the description to search.
locale - the locale.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchDataByEvent

public java.util.Vector searchDataByEvent(java.lang.String sessionUID,
                                          java.util.Hashtable event)
Calls the ISDASProtocol.searchDataByEvent(IHEvent) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
event - the event to search.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

searchDataByEvent

public java.util.Vector searchDataByEvent(java.lang.String sessionUID,
                                          java.lang.String eventUniqueID,
                                          int eventNumber)
Calls the ISDASProtocol.searchDataByEvent(String,int) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
eventUniqueID - the event unique identifier.
eventNumber - the event number.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getData

public java.util.Vector getData(java.lang.String sessionUID,
                                java.lang.String parameterUniqueID,
                                java.lang.String eventUniqueID,
                                int eventNumber)
Calls the ISDASProtocol.getData(String, String, int) implementation method and transforms the result into an array of xml-rpc IData valid structures.

Parameters:
sessionUID - the session unique identifier.
parameterUniqueID - the parameter unique identifier.
eventUniqueID - the event unique identifier.
eventNumber - the event number.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getData

public java.util.Vector getData(java.lang.String sessionUID,
                                java.lang.String parameterUniqueID,
                                java.util.Hashtable event)
Calls the ISDASProtocol.getData(String, IHEvent) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parameterUniqueID - the parameter unique identifier.
event - the event.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getMultipleData

public java.util.Vector getMultipleData(java.lang.String sessionUID,
                                        java.util.Vector parametersUniqueID,
                                        java.util.Vector eventsUniqueID,
                                        java.util.Vector eventsNumber)
Calls the ISDASProtocol.getMultipleData(String[], String[], int[]) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parametersUniqueID - the parameters unique identifiers.
eventsUniqueID - the events unique identifiers.
eventsNumber - the events numbers.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getMultipleData

public java.util.Vector getMultipleData(java.lang.String sessionUID,
                                        java.util.Vector parametersUniqueID,
                                        java.util.Vector events)
Calls the ISDASProtocol.getMultipleData(String[], IHEvent[]) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parametersUniqueID - the parameters unique identifiers.
events - the events.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getMultipleData

public java.util.Vector getMultipleData(java.lang.String sessionUID,
                                        java.util.Vector parametersUniqueID,
                                        java.util.Hashtable event)
Calls the ISDASProtocol.getMultipleData(String[], IHEvent) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parametersUniqueID - the parameters unique identifiers.
event - the event.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getMultipleData

public java.util.Vector getMultipleData(java.lang.String sessionUID,
                                        java.util.Vector parametersUniqueID,
                                        java.lang.String eventUniqueID,
                                        int eventNumber)
Calls the ISDASProtocol.getMultipleData(String[], String, int) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parametersUniqueID - the parameters unique identifiers.
eventUniqueID - the event unique identifier.
eventNumber - the event number.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getMultipleData

public java.util.Vector getMultipleData(java.lang.String sessionUID,
                                        java.lang.String parameterUniqueID,
                                        java.util.Vector eventsUniqueID,
                                        java.util.Vector eventsNumber)
Calls the ISDASProtocol.getMultipleData(String, String[], int[]) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parameterUniqueID - the parameter unique identifier.
eventsUniqueID - the events unique identifiers.
eventsNumber - the event number.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getMultipleData

public java.util.Vector getMultipleData(java.lang.String sessionUID,
                                        java.lang.String parameterUniqueID,
                                        java.lang.String eventUniqueID,
                                        java.util.Vector eventsNumber)
Calls the ISDASProtocol.getMultipleData(String, String, int[]) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
parameterUniqueID - the parameter unique identifier.
eventUniqueID - the event unique identifier.
eventsNumber - the events numbers.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

getPluginFiles

public java.util.Vector getPluginFiles(java.lang.String sessionUID)
Calls the ISDASProtocol.getPluginFiles() implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.

putData

public boolean putData(java.lang.String sessionUID,
                       java.util.Hashtable htData)
Calls the ISDASProtocol.putData(IData) implementation method and transforms the result into a xml-rpc valid structure.

Parameters:
sessionUID - the session unique identifier.
data - the data to store.
Returns:
the response of the implementation transformed into a valid xml-rpc structure.