Class SMTPAgent
- java.lang.Object
-
- org.subethamail.smtp.server.SMTPServer
-
- com.levigo.jadice.server.agent.email.smtp.SMTPAgent
-
- All Implemented Interfaces:
AgentContext
,org.springframework.context.Lifecycle
,org.springframework.jmx.export.naming.SelfNaming
@ManagedResource(description="SMTP Agent") public class SMTPAgent extends org.subethamail.smtp.server.SMTPServer implements org.springframework.jmx.export.naming.SelfNaming, org.springframework.context.Lifecycle, AgentContext
-
-
Constructor Summary
Constructors Constructor Description SMTPAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<InetAddress>
getAllowedClients()
org.subethamail.smtp.AuthenticationHandler
getAuthenticationHandler()
DupeDetection
getDupeDetection()
ErrorRelay
getErrorRelay()
ObjectName
getObjectName()
URI
getRoutingScriptURI()
Map<String,Object>
getScriptParameters()
boolean
isJmxRunning()
void
jmxStart()
void
jmxStop()
void
setAllowedClients(List<String> allowedClients)
void
setAuthenticationHandler(org.subethamail.smtp.AuthenticationHandler authenticationHandler)
void
setDupeDetection(DupeDetection dupeDetection)
void
setErrorRelay(ErrorRelay errorRelay)
void
setRoutingScriptURI(String routingScriptURI)
void
setRoutingScriptURL(URI routingScriptURI)
void
setScriptParameters(Map<String,Object> scriptParameters)
void
start()
void
stop()
void
validatePeer(SocketAddress remoteAddress)
-
Methods inherited from class org.subethamail.smtp.server.SMTPServer
createServerSocket, createSSLSocket, getAuthenticationHandlerFactory, getBacklog, getBindAddress, getCommandHandler, getConnectionTimeout, getDisableReceivedHeaders, getDisableTLS, getDisplayableLocalSocketAddress, getEnableTLS, getExecutorService, getHideTLS, getHostName, getMaxConnections, getMaxMessageSize, getMaxRecipients, getMessageHandlerFactory, getPort, getRequireTLS, getSessionIdFactory, getSoftwareName, isRunning, setAuthenticationHandlerFactory, setBacklog, setBindAddress, setConnectionTimeout, setDisableReceivedHeaders, setDisableTLS, setEnableTLS, setHideTLS, setHostName, setMaxConnections, setMaxMessageSize, setMaxRecipients, setMessageHandlerFactory, setPort, setRequireTLS, setSessionIdFactory, setSoftwareName
-
-
-
-
Method Detail
-
start
public void start()
- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
- Overrides:
start
in classorg.subethamail.smtp.server.SMTPServer
-
jmxStart
@ManagedOperation(description="Start the SMTP Agent") public void jmxStart()
-
stop
public void stop()
- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
- Overrides:
stop
in classorg.subethamail.smtp.server.SMTPServer
-
jmxStop
@ManagedOperation(description="Stop the SMTP Agent") public void jmxStop()
-
isJmxRunning
@ManagedAttribute(description="Check if the SMTP Agent is up and running") public boolean isJmxRunning()
-
getObjectName
public ObjectName getObjectName() throws MalformedObjectNameException
- Specified by:
getObjectName
in interfaceorg.springframework.jmx.export.naming.SelfNaming
- Throws:
MalformedObjectNameException
-
setAllowedClients
public void setAllowedClients(List<String> allowedClients) throws UnknownHostException
- Throws:
UnknownHostException
-
setAuthenticationHandler
public void setAuthenticationHandler(org.subethamail.smtp.AuthenticationHandler authenticationHandler)
-
setErrorRelay
public void setErrorRelay(ErrorRelay errorRelay)
-
setRoutingScriptURI
public void setRoutingScriptURI(String routingScriptURI) throws URISyntaxException
- Throws:
URISyntaxException
-
setRoutingScriptURL
public void setRoutingScriptURL(URI routingScriptURI)
-
validatePeer
public void validatePeer(SocketAddress remoteAddress) throws org.subethamail.smtp.RejectException
- Specified by:
validatePeer
in interfaceAgentContext
- Throws:
org.subethamail.smtp.RejectException
-
getAllowedClients
public List<InetAddress> getAllowedClients()
- Specified by:
getAllowedClients
in interfaceAgentContext
-
getAuthenticationHandler
public org.subethamail.smtp.AuthenticationHandler getAuthenticationHandler()
- Specified by:
getAuthenticationHandler
in interfaceAgentContext
-
getErrorRelay
public ErrorRelay getErrorRelay()
- Specified by:
getErrorRelay
in interfaceAgentContext
-
getRoutingScriptURI
public URI getRoutingScriptURI()
- Specified by:
getRoutingScriptURI
in interfaceAgentContext
-
getScriptParameters
public Map<String,Object> getScriptParameters()
- Specified by:
getScriptParameters
in interfaceAgentContext
-
setDupeDetection
public void setDupeDetection(DupeDetection dupeDetection)
-
getDupeDetection
public DupeDetection getDupeDetection()
- Specified by:
getDupeDetection
in interfaceAgentContext
-
-