abk.j2ee
Class HttpSessionWrapper

java.lang.Object
  extended by abk.j2ee.HttpSessionWrapper
All Implemented Interfaces:
Serializable, javax.servlet.http.HttpSession

public abstract class HttpSessionWrapper
extends Object
implements javax.servlet.http.HttpSession, Serializable

Implementa un wrapper de HttpSession, de forma semejante a como hacen HttpServletRequestWrapper y HttpServletResponseWrapper.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
private  javax.servlet.http.HttpSession session
          Sesión HTTP a la que está vincula la instancia de HttpSessionWrapper.
 
Constructor Summary
  HttpSessionWrapper()
          Deprecated. No debe usarse directamente, únicamente se implementa para el proceso de deserialización.
protected HttpSessionWrapper(javax.servlet.http.HttpSession session)
          Constructor a partir de una sesió:n ya existente.
 
Method Summary
 Object getAttribute(String string)
           
 Enumeration<String> getAttributeNames()
           
 long getCreationTime()
           
 String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 javax.servlet.ServletContext getServletContext()
           
 javax.servlet.http.HttpSession getSession()
           
 javax.servlet.http.HttpSessionContext getSessionContext()
          Deprecated. 
 Object getValue(String string)
          Deprecated. 
 String[] getValueNames()
          Deprecated. 
 void invalidate()
           
 boolean isNew()
           
 void putValue(String string, Object object)
          Deprecated. 
 void removeAttribute(String string)
           
 void removeValue(String string)
          Deprecated. 
 void setAttribute(String string, Object object)
           
 void setMaxInactiveInterval(int i)
           
protected  void setSession(javax.servlet.http.HttpSession session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

session

private transient javax.servlet.http.HttpSession session
Sesión HTTP a la que está vincula la instancia de HttpSessionWrapper.

Constructor Detail

HttpSessionWrapper

protected HttpSessionWrapper(javax.servlet.http.HttpSession session)
Constructor a partir de una sesió:n ya existente. Las clases que extiendan suelen hacer público este constructor.

Parameters:
session - Sesión que encapsulamos.
Throws:
IllegalArgumentException - si session es nulo.

HttpSessionWrapper

@Deprecated
public HttpSessionWrapper()
Deprecated. No debe usarse directamente, únicamente se implementa para el proceso de deserialización.

Para que pueda ser serializable, hay que implementar un constructor público sin argumentos.

Method Detail

getSession

public javax.servlet.http.HttpSession getSession()
Returns:
La instancia de HttpSession encapsulada.

setSession

protected void setSession(javax.servlet.http.HttpSession session)

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface javax.servlet.http.HttpSession

getId

public String getId()
Specified by:
getId in interface javax.servlet.http.HttpSession

getLastAccessedTime

public long getLastAccessedTime()
Specified by:
getLastAccessedTime in interface javax.servlet.http.HttpSession

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface javax.servlet.http.HttpSession

setMaxInactiveInterval

public void setMaxInactiveInterval(int i)
Specified by:
setMaxInactiveInterval in interface javax.servlet.http.HttpSession

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface javax.servlet.http.HttpSession

getSessionContext

@Deprecated
public javax.servlet.http.HttpSessionContext getSessionContext()
Deprecated. 

Specified by:
getSessionContext in interface javax.servlet.http.HttpSession

getAttribute

public Object getAttribute(String string)
Specified by:
getAttribute in interface javax.servlet.http.HttpSession

getValue

@Deprecated
public Object getValue(String string)
Deprecated. 

Specified by:
getValue in interface javax.servlet.http.HttpSession

getAttributeNames

public Enumeration<String> getAttributeNames()
Specified by:
getAttributeNames in interface javax.servlet.http.HttpSession

getValueNames

@Deprecated
public String[] getValueNames()
Deprecated. 

Specified by:
getValueNames in interface javax.servlet.http.HttpSession

setAttribute

public void setAttribute(String string,
                         Object object)
Specified by:
setAttribute in interface javax.servlet.http.HttpSession

putValue

@Deprecated
public void putValue(String string,
                                Object object)
Deprecated. 

Specified by:
putValue in interface javax.servlet.http.HttpSession

removeAttribute

public void removeAttribute(String string)
Specified by:
removeAttribute in interface javax.servlet.http.HttpSession

removeValue

@Deprecated
public void removeValue(String string)
Deprecated. 

Specified by:
removeValue in interface javax.servlet.http.HttpSession

invalidate

public void invalidate()
Specified by:
invalidate in interface javax.servlet.http.HttpSession

isNew

public boolean isNew()
Specified by:
isNew in interface javax.servlet.http.HttpSession


Copyright © 2024. All rights reserved.