1 2 24 25 package com.lutris.appserver.server.sessionEnhydra; 26 27 import java.io.Serializable ; 28 29 import com.lutris.appserver.server.session.SessionException; 30 import com.lutris.appserver.server.user.User; 31 32 40 public class PagedSession extends BasicSession { 41 42 public PagedSession() { 44 } 45 46 53 protected PagedSession(StandardSessionManager sessionManager, 54 String sessionKey) { 55 super(sessionManager, sessionKey, new PagedSessionData()); 56 } 57 58 66 public void setUser(User user) throws SessionException { 67 if (!(user instanceof Serializable )) { 68 throw new SessionException("Paged session user must be serializable."); 69 } 70 super.setUser(user); 71 } 72 73 82 Object [] getTransientData() { 83 Object [] transientData = new Object [1]; 84 transientData[0] = sessionManager; 85 return transientData; 86 } 87 88 97 void restoreTransientData(Object [] data) { 98 this.sessionManager = (StandardSessionManager)data[0]; 99 } 100 101 } 102 103 104 105 106 | Popular Tags |