Class XfbSender

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, IConfigurable, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, NameAware, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle

public class XfbSender extends AbstractSenderWithParameters
Sender for transferring files using the XFB protocol. Assumes sender input is local filename.
Some comments from Richard Maddox (FTO) about UNIX File permissions:

In case of AIX or SUN systems we advise the following user and directory permissions:

SENDING CFT:
- App_user must have secondary group: xfbgw
- Folder should have ownership: app_user:xfbgw (owner:group)
- Folder should have access rights: 770 (rwx.rwx.---) so nobody other then app_user and group xfbgw can do something in this folder
- Folder should have SGID bit set so that all files what is copied to this folder get group ownership xfbgw
- send file must have rights 660 after putting the file in the send directory.

RECEIVING CFT:
- App_user (the application user of customer) should have secondary group: xfbgw
- Folder should have ownership: app_user:xfbgw (owner:group)
- Folder should have access rights: 770 (rwx.rwx.---) so nobody other then app_user and group xfbgw can do something in this folder
- Folder should have SGID bit set, so that all files what is copied to this folder get group ownership xfbgw

There are of course more solutions to get the job done, but this is the solution we can guarantee.
Since:
4.11
Author:
Jaco de Groot
  • Constructor Details

    • XfbSender

      public XfbSender()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: IConfigurable
      Configure this component.

      configure() is called once at startup of the framework in the configure method of the owner of this IConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in the configure(), to improve performance.

      In the case of a container, this will propagate the configure signal to all components that apply.

      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class AbstractSenderWithParameters
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • sendMessage

      @Nonnull public SenderResult sendMessage(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException
      Description copied from interface: ISender
      Send a message to some destination (as configured in the Sender object). This method may only be called after the configure() method is called.

      The following table shows the difference between synchronous and a-synchronous senders:

       synchronousa-synchronous
      ISender.isSynchronous() returnstruefalse
      return value of sendMessage() isthe reply-messagethe messageId of the message sent
      the correlationID specified with sendMessage()may be ignoredis sent with the message
      a {link TimeOutException}may be thrown if a timeout occurs waiting for a replyshould not be expected

      Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, or synchronized.

      Throws:
      SenderException
      TimeoutException
    • setScript

      public void setScript(String script)
      Full pathname to the XFB script to be executed to transfer the file
    • getScript

      public String getScript()
    • setFt

      public void setFt(String ft)
    • getFt

      public String getFt()
    • setFlow

      public void setFlow(String flow)
    • getFlow

      public String getFlow()
    • setAppli

      public void setAppli(String appli)
    • getAppli

      public String getAppli()
    • setNoname

      public void setNoname(String noname)
    • getNoname

      public String getNoname()
    • setCopy

      public void setCopy(boolean copy)
      When set to true, the file is copied before calling the XFB script. Reasons to copy the file: - XFB will rename the file (prefix it with FXB_) and delete it. - On Linux the sticky bit (drwxrws--- wasadmin xfbgw) isn't honoured with a move (only with a copy) (on AIX the sticky bit works for both move and copy).
    • getCopy

      public boolean getCopy()
    • setCopyPrefix

      public void setCopyPrefix(String copyPrefix)
      Prefix for the name of the copied or original filename. When the name of the original file starts with this prefix, it is removed. Otherwise this prefix is added to the filename of the copied file.
    • getCopyPrefix

      public String getCopyPrefix()