|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectesmska.data.Gateway
public class Gateway
Class representing a web gateway. This implementation caches all information retrieved from gateway script in order to reduce the performance impact caused by javascript invocations.
| Nested Class Summary | |
|---|---|
static class |
Gateway.Feature
This enum attributes indicate which various features are supported by a given gateway. |
| Field Summary | |
|---|---|
static java.lang.String |
UNKNOWN
|
| Constructor Summary | |
|---|---|
Gateway(java.net.URL script)
Creates new Gateway. |
|
| Method Summary | |
|---|---|
int |
compareTo(Gateway o)
|
boolean |
equals(java.lang.Object obj)
|
GatewayConfig |
getConfig()
|
int |
getDelayBetweenMessages()
The delay in seconds that must be kept between sending messages. |
java.lang.String |
getDescription()
Short description of the website (purpose, restrictions, etc). |
java.lang.String[] |
getFeatures()
The list of all supported features by this gateway. |
javax.swing.Icon |
getIcon()
Gateway logo icon. |
java.lang.String |
getMaintainer()
Maintainer of the script. |
int |
getMaxChars()
Maximum message length the gateway allows to send. |
int |
getMaxParts()
Number of allowed messages which user can send at once. |
java.lang.String |
getMinProgramVersion()
Minimal program version required to run this script. |
java.lang.String |
getName()
Gateway name. |
java.lang.String[] |
getPreferredPrefixes()
List of telephone prefixes that are preferred by this gateway. |
java.net.URL |
getScript()
URL of gateway script (file or jar URL). |
java.lang.String |
getSenderNameSuffix()
Get sender name signature suffix that should be appended to the message before it is sent. |
int |
getSignatureExtraLength()
Number of extra characters used to display signature. |
int |
getSMSLength()
Length of one SMS. |
java.lang.String[] |
getSupportedLanguages()
Indicates for which website languages the script is working. |
java.lang.String[] |
getSupportedPrefixes()
List of telephone prefixes that are supported by this gateway. |
java.lang.String |
getVersion()
Version of the script. |
java.lang.String |
getWebsite()
The URL of the webpage of this gateway. |
boolean |
hasFeature(Gateway.Feature feature)
Decide whether this particular gateway supports given feature. |
int |
hashCode()
|
boolean |
isFavorite()
Return whether this gateway has been marked as user favorite |
boolean |
isHidden()
Return whether this gateway has been marked as hidden from the user interface |
void |
setConfig(GatewayConfig config)
|
void |
setFavorite(boolean favorite)
Set this gateway as user favorite |
void |
setHidden(boolean hidden)
Set this gateway as hidden from user interface |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String UNKNOWN
| Constructor Detail |
|---|
public Gateway(java.net.URL script)
throws java.io.IOException,
javax.script.ScriptException,
java.security.PrivilegedActionException,
java.beans.IntrospectionException
script - system resource containing gateway script
java.io.IOException - When there are problem accessing the script file
javax.script.ScriptException - When gateway script is invalid
java.security.PrivilegedActionException - When gateway script is invalid
java.beans.IntrospectionException - When current JRE does not support JavaScript execution
java.lang.IllegalArgumentException - When gateway name is not valid| Method Detail |
|---|
public java.net.URL getScript()
public javax.swing.Icon getIcon()
public boolean isFavorite()
public void setFavorite(boolean favorite)
public boolean isHidden()
public void setHidden(boolean hidden)
public boolean hasFeature(Gateway.Feature feature)
public GatewayConfig getConfig()
public void setConfig(GatewayConfig config)
public java.lang.String getSenderNameSuffix()
public int compareTo(Gateway o)
compareTo in interface java.lang.Comparable<Gateway>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
GatewayInfo
getName in interface GatewayInfopublic java.lang.String getVersion()
GatewayInfo
getVersion in interface GatewayInfopublic java.lang.String getMaintainer()
GatewayInfo
getMaintainer in interface GatewayInfopublic java.lang.String getMinProgramVersion()
GatewayInfo
getMinProgramVersion in interface GatewayInfopublic java.lang.String getWebsite()
GatewayInfo
getWebsite in interface GatewayInfopublic java.lang.String getDescription()
GatewayInfo
getDescription in interface GatewayInfopublic java.lang.String[] getSupportedPrefixes()
GatewayInfo
getSupportedPrefixes in interface GatewayInfopublic java.lang.String[] getPreferredPrefixes()
GatewayInfoGatewayInfo.getSupportedPrefixes()) then this will be an empty
array.
getPreferredPrefixes in interface GatewayInfopublic int getSMSLength()
GatewayInfo
getSMSLength in interface GatewayInfopublic int getMaxParts()
GatewayInfo
getMaxParts in interface GatewayInfopublic int getMaxChars()
GatewayInfo
getMaxChars in interface GatewayInfopublic int getSignatureExtraLength()
GatewayInfo
getSignatureExtraLength in interface GatewayInfopublic int getDelayBetweenMessages()
GatewayInfo
getDelayBetweenMessages in interface GatewayInfopublic java.lang.String[] getSupportedLanguages()
GatewayInfo
getSupportedLanguages in interface GatewayInfopublic java.lang.String[] getFeatures()
GatewayInfoGateway.Feature attributes.
getFeatures in interface GatewayInfo
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||