Java Doc for DeltaSession.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » catalina » ha » session » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina.ha.session 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.session.StandardSession
      org.apache.catalina.ha.session.DeltaSession

DeltaSession
public class DeltaSession extends StandardSession implements Externalizable,ClusterSession,ReplicatedMapEntry(Code)
Similar to the StandardSession except that this session will keep track of deltas during a request.
author:
   Filip Hanik
version:
   $Revision: 522786 $ $Date: 2007-03-27 08:52:10 +0200 (mar., 27 mars 2007) $


Field Summary
protected  LockdiffLock
    
public static  org.apache.juli.logging.Loglog
    
protected static  StringManagersm
     The string manager for this package.

Constructor Summary
public  DeltaSession()
     Construct a new Session associated with the specified Manager.
public  DeltaSession(Manager manager)
    

Method Summary
public  voidapplyDiff(byte[] diff, int offset, int length)
     Applies a diff to an existing object.
public  voidexpire(boolean notify)
     Perform the internal processing required to invalidate this session, without triggering an exception if the session has already expired.
public  voidexpire(boolean notify, boolean notifyCluster)
    
protected  ObjectgetAttributeInternal(String name)
     Return the value of an attribute without a check for validity.
public  ClassLoader[]getClassLoaders()
    
public  DeltaRequestgetDeltaRequest()
    
public  byte[]getDiff()
    
public  longgetLastAccessedTimeInternal()
    
protected  longgetLastTimeReplicated()
    
public  longgetVersion()
    
public  booleanisDiffable()
     If this returns true, the map will extract the diff using getDiff() Otherwise it will serialize the entire object.
public  booleanisDirty()
    
public  booleanisPrimarySession()
     returns true if this session is the primary session, if that is the case, the manager can expire it upon timeout.
public  booleanisValid()
     Return the isValid flag for this session.
public  voidlock()
    
public synchronized  voidreadExternal(ObjectInput in)
    
public  voidreadObjectData(ObjectInput stream)
     Read a serialized version of the contents of this session object from the specified object input stream, without requiring that the StandardSession itself have been serialized.
public  voidrecycle()
     Release all object references, and initialize instance variables, in preparation for reuse of this object.
public  voidremoveAttribute(String name, boolean notify)
     Remove the object bound with the specified name from this session.
public  voidremoveAttribute(String name, boolean notify, boolean addDeltaRequest)
    
protected  voidremoveAttributeInternal(String name, boolean notify, boolean addDeltaRequest)
    
public  voidresetDeltaRequest()
    
public  voidresetDiff()
    
protected  voidsetAccessCount(int count)
    
public  voidsetAttribute(String name, Object value)
     Bind an object to this session, using the specified name.
public  voidsetAttribute(String name, Object value, boolean notify, boolean addDeltaRequest)
    
public  voidsetId(String id)
     Set the session identifier for this session.
public  voidsetIdInternal(String id)
     Set the session identifier for this session without notify listeners.
protected  voidsetLastTimeReplicated(long lastTimeReplicated)
    
public  voidsetMaxInactiveInterval(int interval, boolean addDeltaRequest)
    
public  voidsetNew(boolean isNew)
     Set the isNew flag for this session.
public  voidsetNew(boolean isNew, boolean addDeltaRequest)
    
public  voidsetOwner(Object owner)
    
public  voidsetPrimarySession(boolean primarySession)
     Sets whether this is the primary session or not.
public  voidsetPrincipal(Principal principal)
     Set the authenticated Principal that is associated with this Session.
public  voidsetPrincipal(Principal principal, boolean addDeltaRequest)
    
public  voidsetVersion(long version)
    
public  StringtoString()
     Return a string representation of this object.
public  voidunlock()
    
public synchronized  voidwriteExternal(ObjectOutput out)
    
public  voidwriteObjectData(ObjectOutput stream)
     Write a serialized version of the contents of this session object to the specified object output stream, without requiring that the StandardSession itself have been serialized.

Field Detail
diffLock
protected Lock diffLock(Code)



log
public static org.apache.juli.logging.Log log(Code)



sm
protected static StringManager sm(Code)
The string manager for this package.




Constructor Detail
DeltaSession
public DeltaSession()(Code)
Construct a new Session associated with the specified Manager.
Parameters:
  manager - The manager with which this Session is associated



DeltaSession
public DeltaSession(Manager manager)(Code)




Method Detail
applyDiff
public void applyDiff(byte[] diff, int offset, int length) throws IOException, ClassNotFoundException(Code)
Applies a diff to an existing object.
Parameters:
  diff - byte[]
Parameters:
  offset - int
Parameters:
  length - int
throws:
  IOException -



expire
public void expire(boolean notify)(Code)
Perform the internal processing required to invalidate this session, without triggering an exception if the session has already expired.
Parameters:
  notify - Should we notify listeners about the demise of this session?



expire
public void expire(boolean notify, boolean notifyCluster)(Code)



getAttributeInternal
protected Object getAttributeInternal(String name)(Code)
Return the value of an attribute without a check for validity.



getClassLoaders
public ClassLoader[] getClassLoaders()(Code)



getDeltaRequest
public DeltaRequest getDeltaRequest()(Code)



getDiff
public byte[] getDiff() throws IOException(Code)
Returns a diff and sets the dirty map to false byte[]
throws:
  IOException -



getLastAccessedTimeInternal
public long getLastAccessedTimeInternal()(Code)
Return the last client access time without invalidation check
See Also:    #getLastAccessedTime().



getLastTimeReplicated
protected long getLastTimeReplicated()(Code)



getVersion
public long getVersion()(Code)



isDiffable
public boolean isDiffable()(Code)
If this returns true, the map will extract the diff using getDiff() Otherwise it will serialize the entire object. boolean



isDirty
public boolean isDirty()(Code)
Has the object changed since last replication and is not in a locked state boolean



isPrimarySession
public boolean isPrimarySession()(Code)
returns true if this session is the primary session, if that is the case, the manager can expire it upon timeout.



isValid
public boolean isValid()(Code)
Return the isValid flag for this session.



lock
public void lock()(Code)
Lock during serialization



readExternal
public synchronized void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)



readObjectData
public void readObjectData(ObjectInput stream) throws ClassNotFoundException, IOException(Code)
Read a serialized version of the contents of this session object from the specified object input stream, without requiring that the StandardSession itself have been serialized.
Parameters:
  stream - The object input stream to read from
exception:
  ClassNotFoundException - if an unknown class is specified
exception:
  IOException - if an input/output error occurs



recycle
public void recycle()(Code)
Release all object references, and initialize instance variables, in preparation for reuse of this object.



removeAttribute
public void removeAttribute(String name, boolean notify)(Code)
Remove the object bound with the specified name from this session. If the session does not have an object bound with this name, this method does nothing.

After this method executes, and if the object implements HttpSessionBindingListener, the container calls valueUnbound() on the object.
Parameters:
  name - Name of the object to remove from this session.
Parameters:
  notify - Should we notify interested listeners that this attribute isbeing removed?
exception:
  IllegalStateException - if this method is called on an invalidated session




removeAttribute
public void removeAttribute(String name, boolean notify, boolean addDeltaRequest)(Code)



removeAttributeInternal
protected void removeAttributeInternal(String name, boolean notify, boolean addDeltaRequest)(Code)



resetDeltaRequest
public void resetDeltaRequest()(Code)



resetDiff
public void resetDiff()(Code)
Resets the current diff state and resets the dirty flag



setAccessCount
protected void setAccessCount(int count)(Code)



setAttribute
public void setAttribute(String name, Object value)(Code)
Bind an object to this session, using the specified name. If an object of the same name is already bound to this session, the object is replaced.

After this method executes, and if the object implements HttpSessionBindingListener, the container calls valueBound() on the object.
Parameters:
  name - Name to which the object is bound, cannot be null
Parameters:
  value - Object to be bound, cannot be null
exception:
  IllegalArgumentException - if an attempt is made to add a non-serializable object inan environment marked distributable.
exception:
  IllegalStateException - if this method is called on an invalidated session




setAttribute
public void setAttribute(String name, Object value, boolean notify, boolean addDeltaRequest)(Code)



setId
public void setId(String id)(Code)
Set the session identifier for this session.
Parameters:
  id - The new session identifier



setIdInternal
public void setIdInternal(String id)(Code)
Set the session identifier for this session without notify listeners.
Parameters:
  id - The new session identifier



setLastTimeReplicated
protected void setLastTimeReplicated(long lastTimeReplicated)(Code)



setMaxInactiveInterval
public void setMaxInactiveInterval(int interval, boolean addDeltaRequest)(Code)



setNew
public void setNew(boolean isNew)(Code)
Set the isNew flag for this session.
Parameters:
  isNew - The new value for the isNew flag



setNew
public void setNew(boolean isNew, boolean addDeltaRequest)(Code)



setOwner
public void setOwner(Object owner)(Code)



setPrimarySession
public void setPrimarySession(boolean primarySession)(Code)
Sets whether this is the primary session or not.
Parameters:
  primarySession - Flag value



setPrincipal
public void setPrincipal(Principal principal)(Code)
Set the authenticated Principal that is associated with this Session. This provides an Authenticator with a means to cache a previously authenticated Principal, and avoid potentially expensive Realm.authenticate() calls on every request.
Parameters:
  principal - The new Principal, or null if none



setPrincipal
public void setPrincipal(Principal principal, boolean addDeltaRequest)(Code)



setVersion
public void setVersion(long version)(Code)



toString
public String toString()(Code)
Return a string representation of this object.



unlock
public void unlock()(Code)
Unlock after serialization



writeExternal
public synchronized void writeExternal(ObjectOutput out) throws java.io.IOException(Code)



writeObjectData
public void writeObjectData(ObjectOutput stream) throws IOException(Code)
Write a serialized version of the contents of this session object to the specified object output stream, without requiring that the StandardSession itself have been serialized.
Parameters:
  stream - The object output stream to write to
exception:
  IOException - if an input/output error occurs



Fields inherited from org.apache.catalina.session.StandardSession
final protected static boolean ACTIVITY_CHECK(Code)(Java Doc)
final protected static String EMPTY_ARRAY(Code)(Java Doc)
final protected static String NOT_SERIALIZED(Code)(Java Doc)
protected transient AtomicInteger accessCount(Code)(Java Doc)
protected Map attributes(Code)(Java Doc)
protected transient String authType(Code)(Java Doc)
protected transient Method containerEventMethod(Code)(Java Doc)
final protected static Class containerEventTypes(Code)(Java Doc)
protected long creationTime(Code)(Java Doc)
final protected static String[] excludedAttributes(Code)(Java Doc)
protected transient boolean expiring(Code)(Java Doc)
protected transient StandardSessionFacade facade(Code)(Java Doc)
protected String id(Code)(Java Doc)
final protected static String info(Code)(Java Doc)
protected boolean isNew(Code)(Java Doc)
protected boolean isValid(Code)(Java Doc)
protected long lastAccessedTime(Code)(Java Doc)
protected transient ArrayList listeners(Code)(Java Doc)
protected transient Manager manager(Code)(Java Doc)
protected int maxInactiveInterval(Code)(Java Doc)
protected transient Map notes(Code)(Java Doc)
protected transient Principal principal(Code)(Java Doc)
protected static HttpSessionContext sessionContext(Code)(Java Doc)
protected static StringManager sm(Code)(Java Doc)
protected transient PropertyChangeSupport support(Code)(Java Doc)
protected long thisAccessedTime(Code)(Java Doc)

Methods inherited from org.apache.catalina.session.StandardSession
public void access()(Code)(Java Doc)
public void activate()(Code)(Java Doc)
public void addSessionListener(SessionListener listener)(Code)(Java Doc)
public void endAccess()(Code)(Java Doc)
protected boolean exclude(String name)(Code)(Java Doc)
public void expire()(Code)(Java Doc)
public void expire(boolean notify)(Code)(Java Doc)
protected void fireContainerEvent(Context context, String type, Object data) throws Exception(Code)(Java Doc)
public void fireSessionEvent(String type, Object data)(Code)(Java Doc)
public Object getAttribute(String name)(Code)(Java Doc)
public Enumeration getAttributeNames()(Code)(Java Doc)
public String getAuthType()(Code)(Java Doc)
public long getCreationTime()(Code)(Java Doc)
public String getId()(Code)(Java Doc)
public String getIdInternal()(Code)(Java Doc)
public String getInfo()(Code)(Java Doc)
public long getLastAccessedTime()(Code)(Java Doc)
public long getLastAccessedTimeInternal()(Code)(Java Doc)
public Manager getManager()(Code)(Java Doc)
public int getMaxInactiveInterval()(Code)(Java Doc)
public Object getNote(String name)(Code)(Java Doc)
public Iterator getNoteNames()(Code)(Java Doc)
public Principal getPrincipal()(Code)(Java Doc)
public ServletContext getServletContext()(Code)(Java Doc)
public HttpSession getSession()(Code)(Java Doc)
public HttpSessionContext getSessionContext()(Code)(Java Doc)
public Object getValue(String name)(Code)(Java Doc)
public String[] getValueNames()(Code)(Java Doc)
public void invalidate()(Code)(Java Doc)
public boolean isNew()(Code)(Java Doc)
public boolean isValid()(Code)(Java Doc)
protected boolean isValidInternal()(Code)(Java Doc)
protected String[] keys()(Code)(Java Doc)
public void passivate()(Code)(Java Doc)
public void putValue(String name, Object value)(Code)(Java Doc)
protected void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException(Code)(Java Doc)
public void readObjectData(ObjectInputStream stream) throws ClassNotFoundException, IOException(Code)(Java Doc)
public void recycle()(Code)(Java Doc)
public void removeAttribute(String name)(Code)(Java Doc)
public void removeAttribute(String name, boolean notify)(Code)(Java Doc)
protected void removeAttributeInternal(String name, boolean notify)(Code)(Java Doc)
public void removeNote(String name)(Code)(Java Doc)
public void removeSessionListener(SessionListener listener)(Code)(Java Doc)
public void removeValue(String name)(Code)(Java Doc)
public void setAttribute(String name, Object value)(Code)(Java Doc)
public void setAttribute(String name, Object value, boolean notify)(Code)(Java Doc)
public void setAuthType(String authType)(Code)(Java Doc)
public void setCreationTime(long time)(Code)(Java Doc)
public void setId(String id)(Code)(Java Doc)
public void setManager(Manager manager)(Code)(Java Doc)
public void setMaxInactiveInterval(int interval)(Code)(Java Doc)
public void setNew(boolean isNew)(Code)(Java Doc)
public void setNote(String name, Object value)(Code)(Java Doc)
public void setPrincipal(Principal principal)(Code)(Java Doc)
public void setValid(boolean isValid)(Code)(Java Doc)
public void tellNew()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
protected void writeObject(ObjectOutputStream stream) throws IOException(Code)(Java Doc)
public void writeObjectData(ObjectOutputStream stream) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.