net.sourceforge.apphere.ejb
Class AppHereBean

java.lang.Object
  extended bynet.sourceforge.apphere.ejb.AppHereBean
All Implemented Interfaces:
AppHere, javax.ejb.EJBObject, javax.ejb.EnterpriseBean, java.rmi.Remote, java.io.Serializable, javax.ejb.SessionBean

public class AppHereBean
extends java.lang.Object
implements javax.ejb.SessionBean, AppHere

Author:
Dewi
See Also:
Serialized Form

Constructor Summary
AppHereBean()
           
 
Method Summary
 void addDevice(java.lang.String token, java.lang.String deviceName, java.lang.String deviceAddress)
           
 void addPan(java.lang.String token, java.lang.String envName)
           
 int addSession(Session newSess, java.lang.String loginId)
           
 void ejbActivate()
           
 void ejbCreate()
          Default create method
 void ejbPassivate()
           
 void ejbRemove()
           
 javax.ejb.EJBHome getEJBHome()
           
 javax.ejb.Handle getHandle()
           
 java.lang.Object getPrimaryKey()
           
 Session getSession(int sessionID, java.lang.String loginId)
           
 Session[] getSessions(java.lang.String loginId)
           
 java.lang.String getUserInfo(java.lang.String loginId)
           
 boolean isIdentical(javax.ejb.EJBObject arg0)
           
 java.lang.String login(java.lang.String username, java.lang.String password, java.lang.String clientIP)
          Login method
 void remove()
           
 void removeDevice(java.lang.String token, int deviceID)
           
 void removePan(java.lang.String token, int envID)
           
 void removeSession(int sessionID, java.lang.String loginId)
           
 void setDeviceStatus(java.lang.String devId, int status)
           
 void setSessionContext(javax.ejb.SessionContext arg0)
           
 void transferSession(int sessID, java.lang.String destinationIP, java.lang.String loginId)
          Session Transfer Step 1
 void updateDevice(java.lang.String token, int deviceId, java.lang.String deviceName, java.lang.String deviceAddress)
           
 void updatePan(java.lang.String token, int envID, java.lang.String envName, int[] deviceIdList)
           
 void updateSession(Session sessValue, java.lang.String remoteIPAddr, java.lang.String loginId)
          Session Transfer Step 3
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppHereBean

public AppHereBean()
Method Detail

login

public java.lang.String login(java.lang.String username,
                              java.lang.String password,
                              java.lang.String clientIP)
Login method

Specified by:
login in interface AppHere
Parameters:
username -
password -
clientIP -
Returns:
String user token

addSession

public int addSession(Session newSess,
                      java.lang.String loginId)
               throws AppHereException
Specified by:
addSession in interface AppHere
Parameters:
newSess -
loginId -
Returns:
Throws:
InvalidTokenException
AppHereException

updateSession

public void updateSession(Session sessValue,
                          java.lang.String remoteIPAddr,
                          java.lang.String loginId)
                   throws InvalidTokenException,
                          AppHereException
Session Transfer Step 3

Specified by:
updateSession in interface AppHere
Parameters:
sessValue -
remoteIPAddr -
loginId -
Throws:
InvalidTokenException
AppHereException

getSession

public Session getSession(int sessionID,
                          java.lang.String loginId)
                   throws AppHereException
Specified by:
getSession in interface AppHere
Parameters:
sessionID -
loginId -
Returns:
Throws:
InvalidTokenException
AppHereException

getSessions

public Session[] getSessions(java.lang.String loginId)
                      throws AppHereException
Specified by:
getSessions in interface AppHere
Parameters:
loginId -
Returns:
Throws:
InvalidTokenException
AppHereException

transferSession

public void transferSession(int sessID,
                            java.lang.String destinationIP,
                            java.lang.String loginId)
                     throws InvalidTokenException,
                            AppHereException
Session Transfer Step 1

Specified by:
transferSession in interface AppHere
Parameters:
sessID -
destinationIP -
loginId -
Throws:
InvalidTokenException
AppHereException

removeSession

public void removeSession(int sessionID,
                          java.lang.String loginId)
                   throws AppHereException
Specified by:
removeSession in interface AppHere
Parameters:
sessionID -
loginId -
Throws:
InvalidTokenException
AppHereException

getUserInfo

public java.lang.String getUserInfo(java.lang.String loginId)
                             throws InvalidTokenException,
                                    AppHereException
Specified by:
getUserInfo in interface AppHere
Parameters:
loginId -
Returns:
String of xml with user info
Throws:
InvalidTokenException
AppHereException

setDeviceStatus

public void setDeviceStatus(java.lang.String devId,
                            int status)
                     throws AppHereException
Specified by:
setDeviceStatus in interface AppHere
Parameters:
status -
Throws:
AppHereException

addDevice

public void addDevice(java.lang.String token,
                      java.lang.String deviceName,
                      java.lang.String deviceAddress)
               throws AppHereException
Specified by:
addDevice in interface AppHere
Throws:
AppHereException

addPan

public void addPan(java.lang.String token,
                   java.lang.String envName)
            throws AppHereException
Specified by:
addPan in interface AppHere
Throws:
AppHereException

removeDevice

public void removeDevice(java.lang.String token,
                         int deviceID)
                  throws AppHereException
Specified by:
removeDevice in interface AppHere
Throws:
AppHereException

removePan

public void removePan(java.lang.String token,
                      int envID)
               throws AppHereException
Specified by:
removePan in interface AppHere
Parameters:
token -
envID -
Throws:
AppHereException

updateDevice

public void updateDevice(java.lang.String token,
                         int deviceId,
                         java.lang.String deviceName,
                         java.lang.String deviceAddress)
                  throws AppHereException
Specified by:
updateDevice in interface AppHere
Throws:
AppHereException

updatePan

public void updatePan(java.lang.String token,
                      int envID,
                      java.lang.String envName,
                      int[] deviceIdList)
               throws AppHereException
Specified by:
updatePan in interface AppHere
Parameters:
token -
envID -
envName -
deviceIdList -
Throws:
AppHereException

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Default create method

Throws:
javax.ejb.CreateException

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException
Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException
Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

setSessionContext

public void setSessionContext(javax.ejb.SessionContext arg0)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException

getEJBHome

public javax.ejb.EJBHome getEJBHome()
                             throws java.rmi.RemoteException
Specified by:
getEJBHome in interface javax.ejb.EJBObject
Throws:
java.rmi.RemoteException

getHandle

public javax.ejb.Handle getHandle()
                           throws java.rmi.RemoteException
Specified by:
getHandle in interface javax.ejb.EJBObject
Throws:
java.rmi.RemoteException

getPrimaryKey

public java.lang.Object getPrimaryKey()
                               throws java.rmi.RemoteException
Specified by:
getPrimaryKey in interface javax.ejb.EJBObject
Throws:
java.rmi.RemoteException

isIdentical

public boolean isIdentical(javax.ejb.EJBObject arg0)
                    throws java.rmi.RemoteException
Specified by:
isIdentical in interface javax.ejb.EJBObject
Throws:
java.rmi.RemoteException

remove

public void remove()
            throws java.rmi.RemoteException,
                   javax.ejb.RemoveException
Specified by:
remove in interface javax.ejb.EJBObject
Throws:
java.rmi.RemoteException
javax.ejb.RemoveException