Package cern.dip

Interface DipFactory

  • All Known Implementing Classes:
    DipFactoryImp, MockDipFactory

    public interface DipFactory
    Dip (Data Interchange Protocol) is the publish/subscribe interface for the CERN inter-domain communication designed according to the requirements established by the LDIWG (LHC Data Interchange Working Group).

    Factory Interface for DipPublication, DipSubscription and DipData objects.

    Concrete implementations of this interface will require implementation specific parameters such as URL of the broker or naming service. They will normally be implemented as singletons and encapsulate the functionality of the Dip implementation.

    About DIP:

    DIP (Data Interchange Protocol) is the publish/subscribe interface for the CERN inter-domain communication designed according to the requirements established by the LDIWG (LHC Data Interchange Working Group).

    In this working group has been established that any communication between the independent CERN domains shall be exchanged via DIP. The information namespace shall be partitioned in topics, organised in a hierarchical way with the string "dip" and the string describing the domain name coming first. The remaining part of the topic namespace is under the responsibility of the domain.

    For instance the energy of the LHC beam accelerator domain topic may be: "dip.acc.LHC.intensity" where "acc" is the accelerator domain.

    • Method Detail

      • setDNSNode

        void setDNSNode​(java.lang.String nodeName)
        Specifies the DNS to be used for the DIP communication. This setting applies for both the publications and the subscriptions. This method shall be used prior the creation of subscriptions or publications as these become active immediatly. Further calls will be ignored.
        Parameters:
        nodeName - name of the DNS to be used.
      • setTimeout

        void setTimeout​(int timeout)
        Set the write and connection timeout to be used for DIP communication.
        Parameters:
        timeout - Timeout in seconds to be applied to new connections.
      • getTimeout

        int getTimeout()
        Get the write and connection timeout to be used for DIP communication.
      • createDipPublication

        DipPublication createDipPublication​(java.lang.String topicName,
                                            DipPublicationErrorHandler handler)
                                     throws DipException
        Creates a new DipPublication object for the topic specified by topicName. This object can then be used to publish new data on the topic. The handler specified by this call is used to inform the Publication developer of any ansynchronous (errors which can not be directly associated with any DipPublication method call).
        Parameters:
        topicName - name of the subscription topic - must be unique
        handler - - used for handling aysnch. DIP errors.
        Throws:
        DipException - if the publication cannot be created.
        See Also:
        interface,
      • destroyDipSubscription

        void destroyDipSubscription​(DipSubscription subscription)
                             throws DipException
        Destroys DipSubscription object previously created by createDipSubscription().
        Throws:
        DipException - if the subscription is not found.
      • destroyDipPublication

        void destroyDipPublication​(DipPublication publication)
                            throws DipException
        Destroys DipPublication object previously created by createDipPublication().
        Throws:
        DipException - if the subscription is not found.
      • createDipData

        DipData createDipData()
        Creates a new DipData object. DipData objects have to be created for publishing complex data.
      • createDipBrowser

        DipBrowser createDipBrowser()
        Create a browser object with which the namespace of DIP may be viewed.