com.instantbank.lettertemplate.control.web
Class LetterTemplateControllerProxy
java.lang.Object
|
+--com.instantbank.lettertemplate.control.web.LetterTemplateControllerProxy
- All Implemented Interfaces:
- java.io.Serializable
- public class LetterTemplateControllerProxy
- extends java.lang.Object
- implements java.io.Serializable
This class is essentially just a proxy object that calls methods on the EJB
tier using the LetterTemplateControllerEJB
object. All the methods that access the EJB are synchronized so that
concurrent requests do not happen to the stateful session bean.
- Author:
- Instant-bank (Consuelo Franky)
- See Also:
LetterTemplateController
,
LetterTemplateControllerEJB
,
LetterTemplateEvent
, Serialized Form
Method Summary |
Job |
getJobEJB(java.lang.Long jobId)
get reference to Job EJB instance, valid for web session |
java.util.Collection |
handleEvent(LetterTemplateEvent ese)
feeds the specified event to the state machine of the business logic:
sends the event to the controller ejb and gets a list with names of
Model objects who were updated |
void |
remove()
frees up all the resources associated with this controller and destroys
itself. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
mm
private ModelManager mm
sccEjb
private LetterTemplateController sccEjb
session
private javax.servlet.http.HttpSession session
debug
private Debug debug
LetterTemplateControllerProxy
public LetterTemplateControllerProxy()
- Constructor
LetterTemplateControllerProxy
public LetterTemplateControllerProxy(javax.servlet.http.HttpSession session)
- constructor for an HTTP client.
- Parameters:
session
- web session
getJobEJB
public Job getJobEJB(java.lang.Long jobId)
- get reference to Job EJB instance, valid for web session
- Parameters:
jobId
- Description of the Parameter- Returns:
- The jobEJB value
handleEvent
public java.util.Collection handleEvent(LetterTemplateEvent ese)
throws LetterTemplateEventException
- feeds the specified event to the state machine of the business logic:
sends the event to the controller ejb and gets a list with names of
Model objects who were updated
- Parameters:
ese
- is the current event- Returns:
- a list of models that got
updated because of the processing of this event. In addition, the
first element of the list contains the service answer
(or the "" string when this answer is not required)
- Throws:
LetterTemplateEventException
-
remove
public void remove()
- frees up all the resources associated with this controller and destroys
itself.