public interface ScriptHelper
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
ScriptLogger |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
createBuffer()
Returns a
ByteBuffer that will be automatically cleaned up once the transaction completes. |
sun.net.www.MimeEntry |
findMimeEntryByExt(String ext)
Locate a
sun.net.www.MimeEntry by the file extension that has been associated with it. |
sun.net.www.MimeEntry |
findMimeEntryByType(String mimeType)
Locate a
sun.net.www.MimeEntry by it's MIMEType |
String |
formatDate(long millisecondsSinceEpoch)
Format millisecond based date into a GMT string compatible with HTTP headers protocol.
|
String[] |
getAcceptableLocales()
Return the language Locales accepted by the requesting client in order of preference (best to least).
|
String |
getCharacterEncoding()
Returns the charset of the Content-Type header
|
String |
getHOSTName()
Returns the host name as seen by the calling client.
|
int |
getHOSTPort()
Returns the host port as seen by the calling client.
|
DateFormat |
getHTTPDateFormater()
Get a new date formatter compatible with HTTP headers protocol.
|
InetAddress |
getLocalAddress()
Return the underlying local
InetAddress for this request / response transaction |
int |
getLocalPort()
Return the underlying local socket port for this request / response transaction
|
InetAddress |
getRemoteAddress()
Return the underlying remote
InetAddress for this request / response transaction |
int |
getRemotePort()
Return the underlying remote socket port for this request / response transaction
|
String |
getScheme()
Returns http or https scheme of this transaction
|
String |
makeAbsoluteUrl(String location)
Convert (if necessary) and return the absolute URL that represents the resource referenced by this possibly relative URL.
|
ByteBuffer createBuffer()
ByteBuffer
that will be automatically cleaned up once the transaction completes.String getScheme()
String makeAbsoluteUrl(String location)
location
- URL to be (possibly) converted and then returnedIllegalArgumentException
- if a MalformedURLException is thrown when converting the relative URL to an absolute oneString[] getAcceptableLocales()
sun.net.www.MimeEntry findMimeEntryByType(String mimeType)
sun.net.www.MimeEntry
by it's MIMETypesun.net.www.MimeEntry findMimeEntryByExt(String ext)
sun.net.www.MimeEntry
by the file extension that has been associated with it.InetAddress getLocalAddress()
InetAddress
for this request / response transactionint getLocalPort()
InetAddress getRemoteAddress()
InetAddress
for this request / response transactionint getRemotePort()
String getHOSTName()
int getHOSTPort()
String getCharacterEncoding()
DateFormat getHTTPDateFormater()
String formatDate(long millisecondsSinceEpoch)
millisecondsSinceEpoch
- URL to be (possibly) converted and then returnedCopyright © 2015–2024 Frank Stock. All rights reserved.