org.norther.tammi.spray.terminal.chain
Interface TerminalExtension

All Superinterfaces:
Extension
All Known Implementing Classes:
TerminalRequest.TerminalRequestExtension

public interface TerminalExtension
extends Extension

An interface to a terminal specific extension of a servlet request. It is saved as a request attribute using its class name.

Version:
$Id: TerminalExtension.java,v 1.12 2010-04-09 15:46:23 cvsimp Exp $
Author:
Ilkka Priha

Field Summary
static String KEY
          The extension key.
 
Method Summary
 String getDefaultCharactedEncoding()
          Gets the default character extension of the MIME type of the terminal.
 String getDefaultExtension()
          Gets the default file extension of the MIME type of the terminal.
 String getMobileStationIsdn()
          Gets the MSISDN (phone number) of the terminal.
 MimeType getPreferredContentType()
          Gets the preferred MIME type of the terminal.
 Profile getProfile()
          Gets the profile.
 String getTerminalId()
          Gets the terminal id.
 Locale getTerminalLocale()
          Gets the current locale with terminal specific variants.
 Locale getTerminalLocale(Locale locale)
          Gets the specified locale with terminal specific variants.
 String getUserAgentVariant()
          Gets the user agent variant.
 void setTerminalLocale(Locale locale)
          Sets the current locale with terminal specific variants.
 

Field Detail

KEY

static final String KEY
The extension key.

Method Detail

getProfile

Profile getProfile()
Gets the profile.

Returns:
the profile.

getTerminalId

String getTerminalId()
Gets the terminal id. The id is terminal specific and not always unique.

Returns:
a terminal specific id.

getMobileStationIsdn

String getMobileStationIsdn()
Gets the MSISDN (phone number) of the terminal.

Returns:
the MSISDN or null if not supported.

getPreferredContentType

MimeType getPreferredContentType()
Gets the preferred MIME type of the terminal.

Returns:
the read-only MIME type of the terminal.

getDefaultCharactedEncoding

String getDefaultCharactedEncoding()
Gets the default character extension of the MIME type of the terminal.

Returns:
the character encoding or null.

getDefaultExtension

String getDefaultExtension()
Gets the default file extension of the MIME type of the terminal.

Returns:
the file extension (html, wml, txt, ...).

getUserAgentVariant

String getUserAgentVariant()
Gets the user agent variant.

Returns:
the user agent variant or an empty string.

getTerminalLocale

Locale getTerminalLocale()
Gets the current locale with terminal specific variants.

Returns:
the terminal specific locale or null.

setTerminalLocale

void setTerminalLocale(Locale locale)
Sets the current locale with terminal specific variants.

Parameters:
locale - the terminal specific locale.

getTerminalLocale

Locale getTerminalLocale(Locale locale)
Gets the specified locale with terminal specific variants.

Parameters:
locale - the locale to customize.
Returns:
the terminal specific locale or null.


Copyright © 2004 The Norther Organization. All rights reserved.