xmlBlaster 2.2.0 client API

org.xmlBlaster.client.protocol.email
Class EmailCallbackImpl

java.lang.Object
  extended by org.xmlBlaster.util.protocol.RequestReplyExecutor
      extended by org.xmlBlaster.util.protocol.email.EmailExecutor
          extended by org.xmlBlaster.client.protocol.email.EmailCallbackImpl
All Implemented Interfaces:
I_CallbackServer, I_AdminPlugin, I_AdminUsage, I_ResponseListener, I_Plugin, EmailExecutorMBean, RequestReplyExecutorMBean

public class EmailCallbackImpl
extends EmailExecutor
implements I_CallbackServer

Used for client to receive xmlBlaster callbacks over emails.

Author:
Marcel Ruff.
See Also:
The protocol.email requirement

Nested Class Summary
 
Nested classes/interfaces inherited from class org.xmlBlaster.util.protocol.email.EmailExecutor
EmailExecutor.LoopProtection
 
Field Summary
 
Fields inherited from class org.xmlBlaster.util.protocol.email.EmailExecutor
bcc, BOUNCE_MAILFROM_KEY, BOUNCE_MAILTO_KEY, BOUNCE_MESSAGEID_KEY, cc, fromAddress, messageIdFileName, msgInfoParserClassName, payloadFileNamePrefix, pop3Driver, senderLoopProtectionMap, smtpClient, SUBJECT_MESSAGEID_TOKEN, subjectTemplate, toAddress
 
Fields inherited from class org.xmlBlaster.util.protocol.RequestReplyExecutor
addressConfig, addressServer, cbClient, compressZlib, compressZlibStream, contextNode, mbeanHandle, minSizeForCompression, ONEWAY, pingResponseTimeout, prefix, progressListener, responseListenerMap, responseTimeout, updateResponseTimeout, useEmailExpiryTimestamp, WAIT_ON_RESPONSE
 
Constructor Summary
EmailCallbackImpl()
          Called by plugin loader which calls init(Global, PluginInfo) thereafter.
 
Method Summary
 java.lang.String getCbAddress()
          Returns the current callback address.
 java.lang.String getCbProtocol()
          Returns the protocol type.
 java.lang.String getType()
          Enforced by I_Plugin
 java.lang.String getVersion()
          Enforced by I_Plugin
 void init(Global glob, PluginInfo pluginInfo)
          This method is called by the PluginManager (enforced by I_Plugin).
 void initialize(Global glob, java.lang.String loginName, CallbackAddress callbackAddress, I_CallbackExtended cbClient)
          Initialize and start the callback server A thread receiving all messages from xmlBlaster, and delivering them back to the client code.
 void shutdown()
          Shutdown callback only.
 
Methods inherited from class org.xmlBlaster.util.protocol.email.EmailExecutor
createMessageId, getBcc, getCc, getDefaultResponseTimeout, getDefaultUpdateResponseTimeout, getEmailSessionId, getEmailSessionId, getFrom, getLoopProtectionList, getLoopProtections, getMsgInfoParserClassName, getPop3Driver, getSecretSessionId, getSmtpClient, getTo, getUsageUrl, incomingMessage, init, isAlive, isLoopingMail, isShutdown, ping, removeFromLoopProtection, sendEmail, sendEmail, sendEmail, sendEmail, sendMessage, sendUpdateOneway, setBcc, setCc, setEmailSessionId, setEmailSessionId, setFrom, setSecretSessionId, setTo, setUsageUrl, usage
 
Methods inherited from class org.xmlBlaster.util.protocol.RequestReplyExecutor
addResponseListener, clearResponseListenerMap, executeException, executeResponse, freePendingThreads, getAddressServer, getCbClient, getDefaultPingResponseTimeout, getExpiryTimestamp, getMinSizeForCompression, getPendingRequestList, getPingResponseTimeout, getProgressListener, getResponseListener, getResponseTimeout, getResponseTimeout, getResponseTimeout, getResponseTimeoutPropertyName, getUpdateResponseTimeout, getXmlBlasterCore, hasConnection, initialize, initializeCb, interruptInvocation, isCompressZlib, isCompressZlibStream, isShutdownCompletly, isUseEmailExpiryTimestamp, receiveReply, registerProgressListener, removeResponseListener, requestAndBlockForReply, setCbClient, setCompressZlib, setCompressZlibStream, setLoginName, setMinSizeForCompression, setPingResponseTimeout, setResponseTimeout, setUpdateResponseTimeout, setUseEmailExpiryTimestamp, setXmlBlasterCore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xmlBlaster.util.protocol.RequestReplyExecutorMBean
getMinSizeForCompression, getPingResponseTimeout, getResponseTimeout, getResponseTimeout, getUpdateResponseTimeout, interruptInvocation, isCompressZlib, isCompressZlibStream, isUseEmailExpiryTimestamp, setCompressZlib, setCompressZlibStream, setMinSizeForCompression, setPingResponseTimeout, setResponseTimeout, setUpdateResponseTimeout, setUseEmailExpiryTimestamp
 

Constructor Detail

EmailCallbackImpl

public EmailCallbackImpl()
Called by plugin loader which calls init(Global, PluginInfo) thereafter. A thread receiving all messages from xmlBlaster, and delivering them back to the client code.

Method Detail

getType

public java.lang.String getType()
Enforced by I_Plugin

Specified by:
getType in interface I_AdminPlugin
Specified by:
getType in interface I_Plugin
Specified by:
getType in class RequestReplyExecutor
Returns:
"SOCKET" or "EMAIL", never null

getVersion

public java.lang.String getVersion()
Enforced by I_Plugin

Specified by:
getVersion in interface I_AdminPlugin
Specified by:
getVersion in interface I_Plugin
Returns:
For example "1.0"

init

public void init(Global glob,
                 PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin).

Specified by:
init in interface I_Plugin
See Also:
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)

initialize

public final void initialize(Global glob,
                             java.lang.String loginName,
                             CallbackAddress callbackAddress,
                             I_CallbackExtended cbClient)
                      throws XmlBlasterException
Initialize and start the callback server A thread receiving all messages from xmlBlaster, and delivering them back to the client code.

Specified by:
initialize in interface I_CallbackServer
Parameters:
glob - The global handle with your environment settings
loginName - The login name of the client, for logging only
callbackAddress - The address configuration of this callback server
cbClient - Your implementation to receive the callback messages from xmlBlaster
Throws:
XmlBlasterException

getCbProtocol

public final java.lang.String getCbProtocol()
Returns the protocol type.

Specified by:
getCbProtocol in interface I_CallbackServer
Returns:
The configured [type] in xmlBlaster.properties, defaults to "email"

getCbAddress

public java.lang.String getCbAddress()
                              throws XmlBlasterException
Description copied from interface: I_CallbackServer
Returns the current callback address.

Specified by:
getCbAddress in interface I_CallbackServer
Returns:
e.g. "email:et@mars.universe"
Throws:
XmlBlasterException

shutdown

public void shutdown()
Shutdown callback only.

Specified by:
shutdown in interface I_CallbackServer
Specified by:
shutdown in interface I_AdminPlugin
Specified by:
shutdown in interface I_Plugin
Overrides:
shutdown in class EmailExecutor

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.