org.apache.james.protocols.smtp
Interface SMTPSession

All Superinterfaces:
ProtocolSession, TLSSupportedSession

public interface SMTPSession
extends TLSSupportedSession

All the handlers access this interface to communicate with SMTPHandler object


Field Summary
static java.lang.String CURRENT_HELO_MODE
          HELO or EHLO
static java.lang.String CURRENT_HELO_NAME
           
static java.lang.String RCPT_LIST
          The message recipients
static java.lang.String SENDER
          Sender's email address
static java.lang.String SESSION_STATE_MAP
          the Session state
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getConnectionState()
          Returns Map that consists of the state of the SMTPSession per connection
 java.lang.String getHelloName()
          Returns the service wide hello name
 long getMaxMessageSize()
          Returns the service wide maximum message size in bytes.
 int getRcptCount()
          Returns the recipient count
 java.lang.String getSessionID()
          Returns the SMTP session id
 java.lang.String getSMTPGreeting()
          Return the SMTPGreeting which should used.
 boolean isAuthSupported()
          Returns whether Authentication is required or not
 boolean isRelayingAllowed()
          Returns whether Relaying is allowed or not
 void popLineHandler()
          Pop the last command handler
 void pushLineHandler(LineHandler<SMTPSession> overrideCommandHandler)
          Put a new line handler in the chain
 void setRelayingAllowed(boolean relayingAllowed)
          Set if reallying is allowed
 void sleep(long ms)
          Sleep for the given ms
 boolean useAddressBracketsEnforcement()
          Return wheter the mailserver will accept addresses without brackets enclosed.
 boolean useHeloEhloEnforcement()
          Returns whether the remote server needs to send a HELO/EHLO of its senders.
 
Methods inherited from interface org.apache.james.protocols.api.TLSSupportedSession
getUser, isStartTLSSupported, isTLSStarted, setUser, startTLS
 
Methods inherited from interface org.apache.james.protocols.api.ProtocolSession
getLogger, getRemoteHost, getRemoteIPAddress, getState, resetState, writeResponse, writeStream
 

Field Detail

SENDER

static final java.lang.String SENDER
Sender's email address

See Also:
Constant Field Values

RCPT_LIST

static final java.lang.String RCPT_LIST
The message recipients

See Also:
Constant Field Values

CURRENT_HELO_MODE

static final java.lang.String CURRENT_HELO_MODE
HELO or EHLO

See Also:
Constant Field Values

CURRENT_HELO_NAME

static final java.lang.String CURRENT_HELO_NAME
See Also:
Constant Field Values

SESSION_STATE_MAP

static final java.lang.String SESSION_STATE_MAP
the Session state

See Also:
Constant Field Values
Method Detail

getHelloName

java.lang.String getHelloName()
Returns the service wide hello name

Returns:
the hello name

useHeloEhloEnforcement

boolean useHeloEhloEnforcement()
Returns whether the remote server needs to send a HELO/EHLO of its senders.

Returns:
whether SMTP authentication is on

getSMTPGreeting

java.lang.String getSMTPGreeting()
Return the SMTPGreeting which should used.

Returns:
the SMTPGreeting

getMaxMessageSize

long getMaxMessageSize()
Returns the service wide maximum message size in bytes.

Returns:
the maximum message size

useAddressBracketsEnforcement

boolean useAddressBracketsEnforcement()
Return wheter the mailserver will accept addresses without brackets enclosed.

Returns:
true or false

isRelayingAllowed

boolean isRelayingAllowed()
Returns whether Relaying is allowed or not

Returns:
the relaying status

setRelayingAllowed

void setRelayingAllowed(boolean relayingAllowed)
Set if reallying is allowed

Parameters:
relayingAllowed -

isAuthSupported

boolean isAuthSupported()
Returns whether Authentication is required or not

Returns:
authentication required or not

getSessionID

java.lang.String getSessionID()
Returns the SMTP session id

Returns:
SMTP session id

getRcptCount

int getRcptCount()
Returns the recipient count

Returns:
recipient count

getConnectionState

java.util.Map<java.lang.String,java.lang.Object> getConnectionState()
Returns Map that consists of the state of the SMTPSession per connection

Returns:
map of the current SMTPSession state per connection

pushLineHandler

void pushLineHandler(LineHandler<SMTPSession> overrideCommandHandler)
Put a new line handler in the chain

Parameters:
overrideCommandHandler -

popLineHandler

void popLineHandler()
Pop the last command handler


sleep

void sleep(long ms)
Sleep for the given ms

Parameters:
ms - the time to sleep in milliseconds


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.