|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.scripting.engine.Variable
com.sun.slamd.scripting.mail.SMTPConnectionVariable
This class defines a variable that maintains a connection to an SMTP mail server and allows for interaction with that server. An SMTP connection has the following methods:
| Field Summary | |
static java.lang.String |
AUTH_CRAM_MD5_METHOD_NAME
The name of the method that can be used to authenticate to the server using CRAM-MD5. |
static int |
AUTH_CRAM_MD5_METHOD_NUMBER
The method number for the "authCRAMMD5" method. |
static java.lang.String |
AUTH_LOGIN_METHOD_NAME
The name of the method that can be used to authenticate to the server using AUTH LOGIN. |
static int |
AUTH_LOGIN_METHOD_NUMBER
The method number for the "authLogin" method. |
static java.lang.String |
AUTH_PLAIN_METHOD_NAME
The name of the method that can be used to authenticate to the server using AUTH PLAIN. |
static int |
AUTH_PLAIN_METHOD_NUMBER
The method number for the "authPlain" method. |
static int |
CONNECT_1_METHOD_NUMBER
The method number for the first "connect" method. |
static int |
CONNECT_2_METHOD_NUMBER
The method number for the second "connect" method. |
static java.lang.String |
CONNECT_METHOD_NAME
The name of the method that can be used to establish a connection to an SMTP server. |
static java.lang.String |
DISCONNECT_METHOD_NAME
The name of the method that can be used to disconnect from an SMTP server. |
static int |
DISCONNECT_METHOD_NUMBER
The method number for the "disconnect" method. |
static java.lang.String |
EOL
The end of line character as required by RFC 821. |
static java.lang.String |
GET_FAILURE_REASON_METHOD_NAME
The name of the method that can be used to determine the reason that the last operation failed. |
static int |
GET_FAILURE_REASON_METHOD_NUMBER
The method number for the "getFailureReason" method. |
static java.lang.String |
NOOP_METHOD_NAME
The name of the method that sends a "NOOP" to the server. |
static int |
NOOP_METHOD_NUMBER
The method number for the "noOp" method. |
static java.lang.String |
SEND_COMMAND_METHOD_NAME
The name of the method that can be used to send a raw SMTP command to the server. |
static int |
SEND_COMMAND_METHOD_NUMBER
The method number for the "sendCommand" method. |
static java.lang.String |
SEND_METHOD_NAME
The name of the method that can be used to send a message to the SMTP server. |
static int |
SEND_METHOD_NUMBER
The method number for the "send" method. |
static Method[] |
SMTP_CONNECTION_VARIABLE_METHODS
The set of methods associated with SMTP connection variables. |
static java.lang.String |
SMTP_CONNECTION_VARIABLE_TYPE
The name that will be used for the data type of SMTP connection variables. |
| Constructor Summary | |
SMTPConnectionVariable()
Creates a new variable with no name, to be used only when creating a variable with Class.newInstance(), and only when
setName() is called after that to set the name. |
|
| Method Summary | |
void |
assign(Argument argument)
Assigns the value of the provided argument to this variable. |
Variable |
executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
Executes the specified method, using the provided variables as arguments to the method, and makes the return value available to the caller. |
int |
getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the method number for the method that has the specified name and argument types, or -1 if there is no such method. |
Method[] |
getMethods()
Retrieves a list of all methods defined for this variable. |
java.lang.String |
getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the return type for the method with the specified name and argument types. |
java.lang.String |
getValueAsString()
Retrieves a string representation of the value of this argument. |
java.lang.String |
getVariableTypeName()
Retrieves the name of the variable type for this variable. |
boolean |
hasMethod(java.lang.String methodName)
Indicates whether this variable type has a method with the specified name. |
| Methods inherited from class com.sun.slamd.scripting.engine.Variable |
getArgumentAsString, getArgumentType, getArgumentValue, getName, getStatTrackers, isValidIdentifier, setName, startStatTrackers, stopStatTrackers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String SMTP_CONNECTION_VARIABLE_TYPE
public static final java.lang.String AUTH_CRAM_MD5_METHOD_NAME
public static final int AUTH_CRAM_MD5_METHOD_NUMBER
public static final java.lang.String AUTH_LOGIN_METHOD_NAME
public static final int AUTH_LOGIN_METHOD_NUMBER
public static final java.lang.String AUTH_PLAIN_METHOD_NAME
public static final int AUTH_PLAIN_METHOD_NUMBER
public static final java.lang.String CONNECT_METHOD_NAME
public static final int CONNECT_1_METHOD_NUMBER
public static final int CONNECT_2_METHOD_NUMBER
public static final java.lang.String DISCONNECT_METHOD_NAME
public static final int DISCONNECT_METHOD_NUMBER
public static final java.lang.String GET_FAILURE_REASON_METHOD_NAME
public static final int GET_FAILURE_REASON_METHOD_NUMBER
public static final java.lang.String NOOP_METHOD_NAME
public static final int NOOP_METHOD_NUMBER
public static final java.lang.String SEND_METHOD_NAME
public static final int SEND_METHOD_NUMBER
public static final java.lang.String SEND_COMMAND_METHOD_NAME
public static final int SEND_COMMAND_METHOD_NUMBER
public static final Method[] SMTP_CONNECTION_VARIABLE_METHODS
public static final java.lang.String EOL
| Constructor Detail |
public SMTPConnectionVariable()
throws ScriptException
Class.newInstance(), and only when
setName() is called after that to set the name.
ScriptException - If a problem occurs while initializing the new
variable.| Method Detail |
public java.lang.String getVariableTypeName()
getVariableTypeName in class Variablepublic Method[] getMethods()
getMethods in class Variablepublic boolean hasMethod(java.lang.String methodName)
hasMethod in class VariablemethodName - The name of the method.
true if this variable has a method with the specified
name, or false if it does not.
public int getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
getMethodNumber in class VariablemethodName - The name of the method.argumentTypes - The list of argument types for the method.
public java.lang.String getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
getReturnTypeForMethod in class VariablemethodName - The name of the method.argumentTypes - The set of argument types for the method.
null if there is
no such method defined.
public Variable executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
throws ScriptException
executeMethod in class VariablelineNumber - The line number of the script in which the method
call occurs.methodNumber - The method number of the method to execute.arguments - The set of arguments to use for the method.
null if it
does not return a value.
ScriptException - If the specified method does not exist, or if a
problem occurs while attempting to execute it.
public void assign(Argument argument)
throws ScriptException
assign in class Variableargument - The argument whose value should be assigned to this
variable.
ScriptException - If a problem occurs while performing the
assignment.public java.lang.String getValueAsString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||