interconnect/core/src/main/java/de/taimos/dvalin/interconnect/core/InterconnectConnector.java
/**
     * @param topicName     Topic name
     * @param ico           Interconnect Object
     * @param customHeaders Headers
     * @param secure        Enable secure transport?
     * @throws InfrastructureException If an infrastructure error occurs
     * @throws CryptoException         If the message could not be encrypted
     * @throws JsonGenerationException if the JSON data could not be generated
     * @throws JsonMappingException    if the object could not be mapped to a JSON string
     * @throws IOException             if an I/O related problem occurred
     */
@param topicName     Topic name
@param ico           Interconnect Object
@param customHeaders Headers
@param secure        Enable secure transport.
@param topicName Topic name @param ico Interconnect Object @param customHeaders Headers @param secure Enable secure transport .
public static void sendToTopic(final String topicName, final InterconnectObject ico, final Map<String, Object> customHeaders, final boolean secure) throws InfrastructureException, CryptoException, IOException {
        Preconditions.checkNotNull(topicName, TOPIC_NAME_NULL_ERROR);
        Preconditions.checkNotNull(ico, INTERCONNECT_OBJECT_NULL_ERROR);
        final String body = InterconnectMapper.toJson(ico);
        final Map<String, Object> headers;
        if (customHeaders == null) {
            headers = new HashMap<>(1);
        } else {
            headers = new HashMap<>(customHeaders);
        }
        headers.put(InterconnectConnector.HEADER_ICO_CLASS, ico.getClass().getName());
        MessageConnector.sendToTopic(topicName, body, headers, secure);
    }
public static void sendToTopic ( final String topicName , final InterconnectObject ico , final Map < String , Object > customHeaders , final boolean secure ) throws InfrastructureException , CryptoException , IOException { Preconditions . checkNotNull ( topicName , TOPIC_NAME_NULL_ERROR ) ; Preconditions . checkNotNull ( ico , INTERCONNECT_OBJECT_NULL_ERROR ) ; final String body = InterconnectMapper . toJson ( ico ) ; final Map < String , Object > headers ; if ( customHeaders == null ) { headers = new HashMap < > ( 1 ) ; } else { headers = new HashMap < > ( customHeaders ) ; } headers . put ( InterconnectConnector . HEADER_ICO_CLASS , ico . getClass ( ) . getName ( ) ) ; MessageConnector . sendToTopic ( topicName , body , headers , secure ) ; }
@param topicName     Topic name
 @param ico           Interconnect Object
 @param customHeaders Headers
 @param secure        Enable secure transport?
@param topicName Topic name @param ico Interconnect Object @param customHeaders Headers @param secure Enable secure transport?