com.ados.hestia.sdk.session
Class SessionProcessor

java.lang.Object
  extended by com.ados.hestia.utils.db.KeyProcessor
      extended by com.ados.hestia.sdk.session.SessionProcessor

public class SessionProcessor
extends KeyProcessor

April 13, 2005. Refactored. Used base class KeyProcessor.

Version:
$Revision: 1512 $ $Date: 2005-12-20 07:42:50 +0900 $

Field Summary
 
Fields inherited from class com.ados.hestia.utils.db.KeyProcessor
m_descriptor, m_log, m_modification, m_processor, m_properties, m_repository
 
Constructor Summary
SessionProcessor(StoreRepository repository, Properties properties)
           
 
Method Summary
 void deleteSessionEntries(SessionKey[] keies)
          Delete array of specific entries.
 int deleteSessionEntries(WhereDescriptor condition)
          Delete set of specific entries based on conditions.
 SessionKey[] getSessionEntries(int sortMode, int offset, int cnt)
          Returns array of key that describes stored sessions.
 SessionKey[] getSessionEntries(int sortMode, WhereDescriptor wd)
          Returns array of key according specific criteria.
 SessionKey[] getSessionEntries(String pipid)
          Returns array of key that describes stored containers for specific pipinstanceid.
 Session getSessionEntry(SessionKey key)
          Extract associated with key container.
 int getSessionEntryCnt()
          Returns number of storing at collector bridge entries.
 SessionKey registerSessionEntry(Session session)
           
protected  SessionKey registerSessionEntry(String uid, Session session)
           
 boolean updateKey(SessionKey key)
          Update key information.
 void updateSession(SessionKey key, Session session)
          Update session at DB which is described by specific key.
 
Methods inherited from class com.ados.hestia.utils.db.KeyProcessor
close, closeSafe, closeStore, containerToTempStore, errorToCollectorError, getContainerFromProcessor, getModificationStatus, getProcessor, getRepository, updateModification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionProcessor

public SessionProcessor(StoreRepository repository,
                        Properties properties)
Method Detail

registerSessionEntry

public SessionKey registerSessionEntry(Session session)
                                throws CollectorException
Parameters:
session - session to register
Returns:
registred key
Throws:
CollectorException - if container can not be registred

registerSessionEntry

protected SessionKey registerSessionEntry(String uid,
                                          Session session)
                                   throws CollectorException
Throws:
CollectorException

getSessionEntries

public SessionKey[] getSessionEntries(int sortMode,
                                      int offset,
                                      int cnt)
                               throws CollectorException
Returns array of key that describes stored sessions.

Parameters:
sortMode - sort mode. See SessionsKeys.SESSION*
offset - specify first requsted key
cnt - specify max number to return
Returns:
array of key that describes stored containers
Throws:
CollectorException - if request can not be processed

getSessionEntries

public SessionKey[] getSessionEntries(String pipid)
                               throws CollectorException
Returns array of key that describes stored containers for specific pipinstanceid.

Parameters:
pipid - pip instanceid
Returns:
array of key that describes stored containers for specific pipinstanceid
Throws:
CollectorException - if request can not be processed

getSessionEntries

public SessionKey[] getSessionEntries(int sortMode,
                                      WhereDescriptor wd)
                               throws CollectorException
Returns array of key according specific criteria.

Parameters:
wd - desciptor of search condiotions
Returns:
array of key that describes stored containers for specific pipinstanceid
Throws:
CollectorException - if request can not be processed

deleteSessionEntries

public void deleteSessionEntries(SessionKey[] keies)
                          throws CollectorException
Delete array of specific entries.

Parameters:
keies - specify entries to delete
Throws:
CollectorException - if request cannot be processed

deleteSessionEntries

public int deleteSessionEntries(WhereDescriptor condition)
                         throws CollectorException
Delete set of specific entries based on conditions.

Parameters:
condition - condition to delete
Returns:
number of delete entries
Throws:
CollectorException - if request cannot be processed

getSessionEntryCnt

public int getSessionEntryCnt()
                       throws CollectorException
Returns number of storing at collector bridge entries.

Returns:
number of storing at collector bridge entries
Throws:
CollectorException - if request fails

getSessionEntry

public Session getSessionEntry(SessionKey key)
                        throws CollectorException
Extract associated with key container.

Parameters:
key - key to seek container
Returns:
associated with key container
Throws:
CollectorException - if container cannot be extracted

updateSession

public void updateSession(SessionKey key,
                          Session session)
                   throws CollectorException
Update session at DB which is described by specific key.

Parameters:
key - describes which session to update.
session - new session
Throws:
CollectorException - if update cannot be performed.

updateKey

public boolean updateKey(SessionKey key)
Update key information.

Parameters:
key - key to update
Returns:
true if key was found and updated


Copyright © 2005-2006 ADOS Co.,Ltd.. All Rights Reserved.