edu.sdsc.inca.depot.util
Class HibernateMessageHandler
java.lang.Object
edu.sdsc.inca.protocol.MessageHandler
edu.sdsc.inca.depot.util.HibernateMessageHandler
- Direct Known Subclasses:
- Insert, Query, SuiteUpdate
public abstract class HibernateMessageHandler
- extends edu.sdsc.inca.protocol.MessageHandler
Created by IntelliJ IDEA.
- Author:
- Shava Smallen <ssmallen@sdsc.edu>
Fields inherited from class edu.sdsc.inca.protocol.MessageHandler |
logger |
Method Summary |
void |
execute(edu.sdsc.inca.protocol.ProtocolReader reader,
edu.sdsc.inca.protocol.ProtocolWriter writer)
Overrides regular MessageHandler execute function in order to handle
hibernate sessions effectively. |
abstract void |
executeHibernateAction(edu.sdsc.inca.protocol.ProtocolReader reader,
edu.sdsc.inca.protocol.ProtocolWriter writer)
Execute a hibernate-related task efficiently (i.e., session is safely
opened and closed. |
Methods inherited from class edu.sdsc.inca.protocol.MessageHandler |
errorReply |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateMessageHandler
public HibernateMessageHandler()
execute
public void execute(edu.sdsc.inca.protocol.ProtocolReader reader,
edu.sdsc.inca.protocol.ProtocolWriter writer)
throws java.lang.Exception
- Overrides regular MessageHandler execute function in order to handle
hibernate sessions effectively. Will open a hibenate session and then
ensure that it's closed after a task is executed. Caller will need to
create a function called executeHibernateAction.
- Specified by:
execute
in class edu.sdsc.inca.protocol.MessageHandler
- Throws:
java.lang.Exception
executeHibernateAction
public abstract void executeHibernateAction(edu.sdsc.inca.protocol.ProtocolReader reader,
edu.sdsc.inca.protocol.ProtocolWriter writer)
throws java.lang.Exception
- Execute a hibernate-related task efficiently (i.e., session is safely
opened and closed.
- Throws:
edu.sdsc.inca.protocol.ProtocolException
java.lang.Exception