|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.ha.httpsession.server.ClusteredHTTPSessionService
JMX Service implementation for ClusteredHTTPSessionServiceMBean
Revisions:
31. decembre 2001 Sacha Labourey:
ClusteredHTTPSessionServiceMBean
Nested Class Summary | |
protected class |
ClusteredHTTPSessionService.CleanupDaemon
|
Field Summary | |
protected ClusteredHTTPSessionService.CleanupDaemon |
cleanup
|
protected static long |
CLEANUP_FREQUENCY
|
protected MessageDigest |
digest
|
protected ClusteredHTTPSessionHome |
httpSessionHome
|
protected LocalClusteredHTTPSessionHome |
localHttpSessionHome
|
protected Random |
random
|
protected static int |
SESSION_ID_BYTES
|
protected static String |
SESSION_ID_HASH_ALGORITHM
|
protected static String |
SESSION_ID_RANDOM_ALGORITHM
|
protected static String |
SESSION_ID_RANDOM_ALGORITHM_ALT
|
protected long |
sessionTimeout
|
protected boolean |
useLocalBean
|
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
ClusteredHTTPSessionService()
|
Method Summary | |
protected ClusteredHTTPSessionBusiness |
createSession(String id,
SerializableHttpSession session)
|
protected String |
encode(byte[] data)
Encode the bytes into a String with a slightly modified Base64-algorithm This code was written by Kevin Kelley |
protected String |
generateSessionId()
Generate a session-id that is not guessable |
protected MessageDigest |
getDigest()
get a MessageDigest hash-generator |
SerializableHttpSession |
getHttpSession(String sessionId,
ClassLoader tcl)
Return the HttpSession associated to a session id. |
protected Random |
getRandom()
get a random-number generator |
String |
getSessionId()
Generates a new session id available cluster-wide |
long |
getSessionTimeout()
Indicate the duration, in ms, after which the session can be cleaned if no access occurs. |
boolean |
getUseLocalBean()
|
protected void |
initRefToBean()
|
void |
removeHttpSession(String sessionId)
Remove an HttpSession from the cluster (log off for example) |
void |
setHttpSession(String sessionId,
SerializableHttpSession session)
Associate a new session with the session id. |
void |
setSessionTimeout(long miliseconds)
Indicate the duration, in ms, after which the session can be cleaned if no access occurs. |
void |
setUseLocalBean(boolean useLocal)
Indicates whether the service should use the local and home interfaces of the entity bean or the remote and remote home interfaces (depending if they are in the same JVM). |
protected void |
startService()
|
protected void |
stopService()
|
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Field Detail |
protected static final long CLEANUP_FREQUENCY
protected static final int SESSION_ID_BYTES
protected static final String SESSION_ID_HASH_ALGORITHM
protected static final String SESSION_ID_RANDOM_ALGORITHM
protected static final String SESSION_ID_RANDOM_ALGORITHM_ALT
protected ClusteredHTTPSessionHome httpSessionHome
protected LocalClusteredHTTPSessionHome localHttpSessionHome
protected ClusteredHTTPSessionService.CleanupDaemon cleanup
protected long sessionTimeout
protected boolean useLocalBean
protected MessageDigest digest
protected Random random
Constructor Detail |
public ClusteredHTTPSessionService()
Method Detail |
public void setHttpSession(String sessionId, SerializableHttpSession session) throws javax.ejb.EJBException
ClusteredHTTPSessionServiceMBean
setHttpSession
in interface ClusteredHTTPSessionServiceMBean
javax.ejb.EJBException
public SerializableHttpSession getHttpSession(String sessionId, ClassLoader tcl) throws javax.ejb.EJBException
ClusteredHTTPSessionServiceMBean
getHttpSession
in interface ClusteredHTTPSessionServiceMBean
javax.ejb.EJBException
public void removeHttpSession(String sessionId) throws javax.ejb.EJBException
ClusteredHTTPSessionServiceMBean
removeHttpSession
in interface ClusteredHTTPSessionServiceMBean
javax.ejb.EJBException
public long getSessionTimeout()
ClusteredHTTPSessionServiceMBean
getSessionTimeout
in interface ClusteredHTTPSessionServiceMBean
public void setSessionTimeout(long miliseconds)
ClusteredHTTPSessionServiceMBean
setSessionTimeout
in interface ClusteredHTTPSessionServiceMBean
public String getSessionId()
ClusteredHTTPSessionServiceMBean
getSessionId
in interface ClusteredHTTPSessionServiceMBean
public void setUseLocalBean(boolean useLocal)
ClusteredHTTPSessionServiceMBean
setUseLocalBean
in interface ClusteredHTTPSessionServiceMBean
public boolean getUseLocalBean()
getUseLocalBean
in interface ClusteredHTTPSessionServiceMBean
protected void startService() throws Exception
Exception
protected void stopService() throws Exception
Exception
protected void initRefToBean() throws Exception
Exception
protected ClusteredHTTPSessionBusiness createSession(String id, SerializableHttpSession session) throws Exception
Exception
protected String generateSessionId()
protected String encode(byte[] data)
data
- The bytes you want to encode
protected Random getRandom()
protected MessageDigest getDigest()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |