com.ibm.broker.config.appdev

Class FlowRendererMSGFLOW

  • java.lang.Object
    • com.ibm.broker.config.appdev.FlowRendererMSGFLOW


  • public class FlowRendererMSGFLOW
    extends java.lang.Object

    The FlowRendererMSGFLOW class provides utility methods to allow the reading and writing of MessageFlow instances in the *.msgflow file format.

     Change Activity:
     -------- ----------- -------------   ------------------------------------
     Reason:  Date:       Originator:     Comments:
     -------- ----------- -------------   ------------------------------------
     xxxxx.x  2010-08-10  dstorey         v7.0.0.2 Release
     xxxxx.x  2011-07-06  dstorey         v8.0.0.0 Release
     
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String copyright 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static MessageFlow read(java.io.File msgflowFile)
      Returns a new MessageFlow instance that is based on the *.msgflow file represented by the supplied File.
      static MessageFlow read(java.nio.file.Path msgflowFile)
      Returns a new MessageFlow instance that is based on the *.msgflow file represented by the supplied File.
      static MessageFlow read(java.lang.String msgFlowUTF8String, java.lang.String flowName)
      Returns a new MessageFlow instance that is based on the *.msgflow file with the supplied contents and name.
      static java.lang.String toString(MessageFlow messageFlow)
      Returns a string representation of the supplied MessageFlow as serialized in the *.msgflow file format.
      static void write(MessageFlow messageFlow, java.io.OutputStream outputStream)
      Serialize the supplied MessageFlow instance to the specified output stream.
      static void write(MessageFlow messageFlow, java.nio.file.Path directory)
      Serialize the supplied MessageFlow instance to the directory of the supplied name.
      static void write(MessageFlow messageFlow, java.lang.String directoryName)
      Serialize the supplied MessageFlow instance to the directory of the supplied name.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlowRendererMSGFLOW

        public FlowRendererMSGFLOW()
    • Method Detail

      • toString

        public static java.lang.String toString(MessageFlow messageFlow)
                                         throws java.io.IOException
        Returns a string representation of the supplied MessageFlow as serialized in the *.msgflow file format.
        Parameters:
        messageFlow - MessageFlow; provided MessageFlow instance
        Returns:
        String; the string holding the message flow in *.msgflow format
        Throws:
        java.io.IOException
      • write

        public static void write(MessageFlow messageFlow,
                                 java.lang.String directoryName)
                          throws java.io.IOException,
                                 com.ibm.broker.MessageBrokerAPIException
        Serialize the supplied MessageFlow instance to the directory of the supplied name. The filename is derived automatically from the MessageFlow's schema location, the MessageFlow name and a static ".msgflow" extension.
        Parameters:
        messageFlow - MessageFlow instance to serialize.
        directoryName - String the directoryLocation to output the message flow file. Empty string is the current working directory.
        Throws:
        java.io.IOException
        com.ibm.broker.MessageBrokerAPIException
      • write

        public static void write(MessageFlow messageFlow,
                                 java.nio.file.Path directory)
                          throws java.io.IOException,
                                 com.ibm.broker.MessageBrokerAPIException
        Serialize the supplied MessageFlow instance to the directory of the supplied name. The filename is derived automatically from the MessageFlow's schema location, the MessageFlow name and a static ".msgflow" extension.
        Parameters:
        messageFlow - MessageFlow instance to serialize.
        directory - The directory (Path) to output the message flow file. Empty string means the current working directory.
        Throws:
        java.io.IOException
        com.ibm.broker.MessageBrokerAPIException
      • write

        public static void write(MessageFlow messageFlow,
                                 java.io.OutputStream outputStream)
                          throws java.io.IOException,
                                 com.ibm.broker.MessageBrokerAPIException
        Serialize the supplied MessageFlow instance to the specified output stream. The filename is derived automatically from the MessageFlow's schema location, the MessageFlow name and a static ".msgflow" extension.
        Parameters:
        messageFlow - MessageFlow instance to serialize.
        outputStream - String the directoryLocation to output the message flow file.
        Throws:
        java.io.IOException
        com.ibm.broker.MessageBrokerAPIException
      • read

        public static MessageFlow read(java.io.File msgflowFile)
                                throws java.io.IOException
        Returns a new MessageFlow instance that is based on the *.msgflow file represented by the supplied File. If the file could not be read for any reason, null is returned.
        Parameters:
        msgflowFile - Describes a valid message flow file that has a .msgflow extension.
        Returns:
        MessageFlow a new MessageFlow instance, or null.
        Throws:
        java.io.IOException
      • read

        public static MessageFlow read(java.nio.file.Path msgflowFile)
                                throws java.io.IOException
        Returns a new MessageFlow instance that is based on the *.msgflow file represented by the supplied File. If the file could not be read for any reason, null is returned.
        Parameters:
        msgflowFile - Describes a valid message flow file that has a .msgflow extension.
        Returns:
        MessageFlow a new MessageFlow instance, or null.
        Throws:
        java.io.IOException
      • read

        public static MessageFlow read(java.lang.String msgFlowUTF8String,
                                       java.lang.String flowName)
                                throws java.io.IOException
        Returns a new MessageFlow instance that is based on the *.msgflow file with the supplied contents and name. If the file could not be read for any reason, null is returned.
        Parameters:
        msgFlowUTF8String - The contents of the *.msgflow file as a String in UTF8 format.
        flowName - The name of the message flow (e.g. "mf1").
        Returns:
        MessageFlow a new MessageFlow instance, or null.
        Throws:
        java.io.IOException