|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jp.ne.dti.lares.foozy.pagemixer.page.DefaultPage
Page information accessing for 'default' page.
ATTENTION:Some Servlet container implementations
(at least, Tomcat 4.1.x or 5.0.x)
can not handle composite suffix, like '*.ja.html' or '*.tar.gz',
because matching algorithm of Servlet mapping.
You should map Servlet by single suffix(like as '*.ja_html' for example)
or use I18NDefaultPage
for building multi locale and
(web container independently)portable web application up.
This class treats the model of 'page' that:
PageEntry
for multiple pages,
which are identified by their own location.For example:
all '*.ja.html' pages in your web application
have 'text/html; charset=Windows-31J' content,
are encoded in "Windows-31J
" in local file system,
and have locale insensitive content.
The name 'default' comes from
'default' of custom specification by
LocalePage
or MonoPage
.
Fields inherited from interface jp.ne.dti.lares.foozy.pagemixer.page.Page |
DEFAULT_ENCODING |
Constructor Summary | |
DefaultPage(java.lang.String contentType,
java.lang.String encoding)
Constructor. |
Method Summary | |
void |
close(java.lang.Object descriptor)
Does nothing because no resource requires release. |
void |
expire(long limit)
Expire old page entries. |
java.lang.String |
getContentType(java.lang.Object descriptor)
Return fixed content type specified at construction time. |
java.lang.String |
getEncoding(java.lang.Object descriptor)
Return fixed encoding specified at construction time. |
java.lang.String |
getLocation(java.lang.Object descriptor)
Return resource location of page. |
PageEntry |
getPageEntry(java.lang.Object descriptor)
Get page entry stored with location of page as key from " Map ". |
java.lang.Object |
open(java.lang.String location,
java.util.Locale locale)
Return specified location as descriptor object. |
void |
putPageEntry(java.lang.Object descriptor,
PageEntry entry)
Store specified entry into " Map "
with location of page as key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultPage(java.lang.String contentType, java.lang.String encoding)
"Encoding
" is treated as shown below:
getCharSet(contentType)
(this also may be null) is used"default encoding"
You should specify
"default encoding"
explicitly,
if you really want to use runtime environment default encoding.
contentType
- of page(s)encoding
- of InputStream for page(s)Method Detail |
public java.lang.Object open(java.lang.String location, java.util.Locale locale) throws java.io.IOException
This implementation treat 'location' as descriptor object, and ignores specified locale.
open
in interface Page
location
- to symbolize target pagelocale
- of target pagepublic void close(java.lang.Object descriptor) throws java.io.IOException
close
in interface Page
descriptor
- of pagepublic java.lang.String getLocation(java.lang.Object descriptor) throws java.io.IOException
getLocation
in interface Page
descriptor
- of pagepublic java.lang.String getContentType(java.lang.Object descriptor) throws java.io.IOException
getContentType
in interface Page
descriptor
- of pagepublic java.lang.String getEncoding(java.lang.Object descriptor) throws java.io.IOException
getEncoding
in interface Page
descriptor
- of pagepublic void putPageEntry(java.lang.Object descriptor, PageEntry entry) throws java.io.IOException
Map
"
with location of page as key.putPageEntry
in interface Page
descriptor
- of pageentry
- to storepublic PageEntry getPageEntry(java.lang.Object descriptor) throws java.io.IOException
Map
".getPageEntry
in interface Page
descriptor
- of pagepublic void expire(long limit)
This expire page entries,
whose last accessing timestamp is earlier than specified one,
from "Map
".
expire
in interface Page
limit
- milliseconds of last access timestamp
|
PageMixer API - 3.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |