public class Gateway extends java.lang.Object implements GatewayInfo, java.lang.Comparable<Gateway>
| Modifier and Type | Class and Description |
|---|---|
static class |
Gateway.Feature
This enum attributes indicate which various features are supported by a given gateway.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
maxMessageLength |
static java.lang.String |
UNKNOWN |
| Constructor and Description |
|---|
Gateway(java.net.URL script)
Creates new Gateway.
|
| Modifier and Type | Method and Description |
|---|---|
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 |
getSenderName()
Get sender name signature that should be prepended to the message
before it is sent.
|
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() |
public static final java.lang.String UNKNOWN
public static final int maxMessageLength
public Gateway(java.net.URL script)
throws java.io.IOException,
javax.script.ScriptException,
java.security.PrivilegedActionException,
java.beans.IntrospectionException
script - system resource containing gateway scriptjava.io.IOException - When there are problem accessing the script filejavax.script.ScriptException - When gateway script is invalidjava.security.PrivilegedActionException - When gateway script is invalidjava.beans.IntrospectionException - When current JRE does not support JavaScript executionjava.lang.IllegalArgumentException - When gateway name is not validpublic 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 int getMaxParts()
public GatewayConfig getConfig()
public void setConfig(GatewayConfig config)
public java.lang.String getSenderName()
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()
GatewayInfogetName in interface GatewayInfopublic java.lang.String getVersion()
GatewayInfogetVersion in interface GatewayInfopublic java.lang.String getMaintainer()
GatewayInfogetMaintainer in interface GatewayInfopublic java.lang.String getMinProgramVersion()
GatewayInfogetMinProgramVersion in interface GatewayInfopublic java.lang.String getWebsite()
GatewayInfogetWebsite in interface GatewayInfopublic java.lang.String getDescription()
GatewayInfogetDescription in interface GatewayInfopublic java.lang.String[] getSupportedPrefixes()
GatewayInfogetSupportedPrefixes in interface GatewayInfopublic java.lang.String[] getPreferredPrefixes()
GatewayInfoGatewayInfo.getSupportedPrefixes()) then this will be an empty
array.getPreferredPrefixes in interface GatewayInfopublic int getSMSLength()
GatewayInfogetSMSLength in interface GatewayInfopublic int getMaxChars()
GatewayInfogetMaxChars in interface GatewayInfopublic int getDelayBetweenMessages()
GatewayInfogetDelayBetweenMessages in interface GatewayInfopublic java.lang.String[] getSupportedLanguages()
GatewayInfogetSupportedLanguages in interface GatewayInfopublic java.lang.String[] getFeatures()
GatewayInfoGateway.Feature attributes.getFeatures in interface GatewayInfo