/* $$ Clover has instrumented this file $$ */// Copyright 2004 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry.test.mock;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionBindingEvent;
import javax.servlet.http.HttpSessionBindingListener;
import javax.servlet.http.HttpSessionContext;
/**
* Mock implementation of {@link javax.servlet.http.HttpSession}.
*
*
* @author Howard Lewis Ship
* @since 3.1
*/
public class MockSession extends AttributeHolder implements HttpSession
{public static com.cortexeb.tools.clover.d __CLOVER_388_0 = com.cortexeb.tools.clover.aq.getRecorder(new char[] {67,58,92,119,111,114,107,115,112,97,99,101,92,106,97,107,97,114,116,97,45,116,97,112,101,115,116,114,121,92,102,114,97,109,101,119,111,114,107,92,116,97,114,103,101,116,92,99,108,111,118,101,114,45,100,98},1096998272901L);
private MockContext _context;
private String _id;
public MockSession(MockContext context, String id)
{try { __CLOVER_388_0.M[2097]++;
__CLOVER_388_0.S[8641]++;_context = context;
__CLOVER_388_0.S[8642]++;_id = id;
} finally { }}
public long getCreationTime()
{try { __CLOVER_388_0.M[2098]++;
__CLOVER_388_0.S[8643]++;return 0;
} finally { }}
public String getId()
{try { __CLOVER_388_0.M[2099]++;
__CLOVER_388_0.S[8644]++;return _id;
} finally { }}
public long getLastAccessedTime()
{try { __CLOVER_388_0.M[2100]++;
__CLOVER_388_0.S[8645]++;return 0;
} finally { }}
public ServletContext getServletContext()
{try { __CLOVER_388_0.M[2101]++;
__CLOVER_388_0.S[8646]++;return _context;
} finally { }}
public void setMaxInactiveInterval(int arg0)
{try { __CLOVER_388_0.M[2102]++;
} finally { }}
public int getMaxInactiveInterval()
{try { __CLOVER_388_0.M[2103]++;
__CLOVER_388_0.S[8647]++;return 0;
} finally { }}
public HttpSessionContext getSessionContext()
{try { __CLOVER_388_0.M[2104]++;
__CLOVER_388_0.S[8648]++;return null;
} finally { }}
public Object getValue(String name)
{try { __CLOVER_388_0.M[2105]++;
__CLOVER_388_0.S[8649]++;return getAttribute(name);
} finally { }}
public String[] getValueNames()
{try { __CLOVER_388_0.M[2106]++;
__CLOVER_388_0.S[8650]++;return getAttributeNamesArray();
} finally { }}
public void putValue(String name, Object value)
{try { __CLOVER_388_0.M[2107]++;
__CLOVER_388_0.S[8651]++;setAttribute(name, value);
} finally { }}
public void removeValue(String name)
{try { __CLOVER_388_0.M[2108]++;
__CLOVER_388_0.S[8652]++;removeAttribute(name);
} finally { }}
public void invalidate()
{try { __CLOVER_388_0.M[2109]++;
} finally { }}
public boolean isNew()
{try { __CLOVER_388_0.M[2110]++;
__CLOVER_388_0.S[8653]++;return false;
} finally { }}
public void setAttribute(String name, Object value)
{try { __CLOVER_388_0.M[2111]++;
__CLOVER_388_0.S[8654]++;super.setAttribute(name, value);
__CLOVER_388_0.S[8655]++;if ((((value instanceof HttpSessionBindingListener) && (++__CLOVER_388_0.CT[1447] != 0)) || (++__CLOVER_388_0.CF[1447] == 0))){
{
__CLOVER_388_0.S[8656]++;HttpSessionBindingListener listener = (HttpSessionBindingListener) value;
__CLOVER_388_0.S[8657]++;HttpSessionBindingEvent event = new HttpSessionBindingEvent(this, name);
__CLOVER_388_0.S[8658]++;listener.valueBound(event);
}}
} finally { }}
}