com.cinecolombia.interfases.control.ejb
Class InterfasesControllerEJB

java.lang.Object
  |
  +--com.cinecolombia.interfases.control.ejb.InterfasesControllerEJB
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class InterfasesControllerEJB
extends java.lang.Object
implements javax.ejb.SessionBean

Session Bean implementation for InterfasesController EJB. This is the EJB-tier controller of the MVC for interfases module. It is implemented as a session EJB. It controls all activities that happen in a client session (managing update events through handleEvent() method) It also provides mechanisms to access other session EJBs and variables: get services for obtaining session variables and for contacting EJBs (entity or session) which are instanced for the user.

Author:
CincoSOFT
See Also:
Serialized Form
Created:
Mayo 2003

Field Summary
private  Debug debug
           
private  javax.ejb.SessionContext sc
           
private  StateMachine sm
           
private  Interfases varInterfases
           
 
Constructor Summary
InterfasesControllerEJB()
          Constructor for the InterfasesControllerEJB object
 
Method Summary
 void ejbActivate()
          activation after swapping
 void ejbCreate()
          after creation of ejb instance
 void ejbPassivate()
          before swappping
 void ejbRemove()
          before remove ejb instance
 Interfases getInterfases(java.lang.String companyId, java.lang.Long userId, java.lang.String[] ordenProcs)
          get reference to Interfases EJB
 java.lang.String getW()
           
 java.util.Collection handleEvent(InterfasesEvent ese)
          Principal service: Feeds the specified event to the state machine of the business logic.
 void setSessionContext(javax.ejb.SessionContext sc)
          Sets the sessionContext attribute of the InterfasesControllerEJB object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sm

private StateMachine sm

varInterfases

private Interfases varInterfases

sc

private javax.ejb.SessionContext sc

debug

private Debug debug
Constructor Detail

InterfasesControllerEJB

public InterfasesControllerEJB()
Constructor for the InterfasesControllerEJB object

Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sc)
Sets the sessionContext attribute of the InterfasesControllerEJB object

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sc - The new sessionContext value

ejbActivate

public void ejbActivate()
activation after swapping

Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
before swappping

Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
after creation of ejb instance


ejbRemove

public void ejbRemove()
before remove ejb instance

Specified by:
ejbRemove in interface javax.ejb.SessionBean

handleEvent

public java.util.Collection handleEvent(InterfasesEvent ese)
                                 throws InterfasesEventException
Principal service: Feeds the specified event to the state machine of the business logic.

Parameters:
ese - event corresponding to user request
Returns:
a list of models (EJBs names) 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:
InterfasesEventException

getInterfases

public Interfases getInterfases(java.lang.String companyId,
                                java.lang.Long userId,
                                java.lang.String[] ordenProcs)
get reference to Interfases EJB

Parameters:
companyId - Description of the Parameter
userId - Description of the Parameter
ordenProcs - Description of the Parameter
Returns:
the Interfases session bean for this session

getW

public java.lang.String getW()
Returns:
the w variable for this session: these variables are maintained by StateMachine javaBean