-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from awslabs/servlet-improvements
Servlet improvements merge for 0.8 release
- Loading branch information
Showing
34 changed files
with
913 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
...er-core/src/main/java/com/amazonaws/serverless/proxy/internal/servlet/AwsHttpSession.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
package com.amazonaws.serverless.proxy.internal.servlet; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import javax.servlet.ServletContext; | ||
import javax.servlet.http.HttpSession; | ||
import javax.servlet.http.HttpSessionContext; | ||
import java.util.Enumeration; | ||
|
||
public class AwsHttpSession implements HttpSession { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(AwsHttpSession.class); | ||
private String id; | ||
|
||
/** | ||
* @param id API gateway request ID. | ||
*/ | ||
public AwsHttpSession(String id) { | ||
if (null == id) { | ||
throw new RuntimeException("HTTP session id (from request ID) cannot be null"); | ||
} | ||
log.debug("Creating session " + id); | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public long getCreationTime() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public long getLastAccessedTime() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public ServletContext getServletContext() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void setMaxInactiveInterval(int interval) { | ||
|
||
} | ||
|
||
@Override | ||
public int getMaxInactiveInterval() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public HttpSessionContext getSessionContext() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Object getAttribute(String name) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Object getValue(String name) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Enumeration<String> getAttributeNames() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String[] getValueNames() { | ||
return new String[0]; | ||
} | ||
|
||
@Override | ||
public void setAttribute(String name, Object value) { | ||
|
||
} | ||
|
||
@Override | ||
public void putValue(String name, Object value) { | ||
|
||
} | ||
|
||
@Override | ||
public void removeAttribute(String name) { | ||
|
||
} | ||
|
||
@Override | ||
public void removeValue(String name) { | ||
|
||
} | ||
|
||
@Override | ||
public void invalidate() { | ||
|
||
} | ||
|
||
@Override | ||
public boolean isNew() { | ||
return false; | ||
} | ||
} |
Oops, something went wrong.