Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2014 dc-square GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *       http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.dcsquare.hivemq.spi.services;
This Service allows plugin developers to

* Add custom $SYS topics at runtime
* Remove existing $SYS topics at runtime
* Query for existing $SYS topics at runtime

Author(s):
Dominik Obermaier
Since:
2.0
public interface SYSTopicService {


    
Returns a Collection of all com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntrys topics available. It is possible to filter the returned list by com.dcsquare.hivemq.spi.topic.sys.Type. By default, this method will return all com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntrys.

Parameters:
types the com.dcsquare.hivemq.spi.topic.sys.Types to filter
Returns:
a Collection of all $SYS topics registered to HiveMQ of the given Types
    Collection<SYSTopicEntrygetAllEntries(Type... types);

    
Checks if the SYSTopicService contains a given com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntry.

Parameters:
entry the com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntry to check
Returns:
true if the Service contains the given com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntry, false otherwise
    boolean contains(final SYSTopicEntry entry);

    
    Optional<SYSTopicEntrygetEntry(String topic);

    
Adds a new $SYS topic entry. The topic of the given com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntry must start with '$SYS'.

    void addEntry(final SYSTopicEntry entry);

    
Removes a com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntry

Parameters:
entry the entry to remove
Returns:
true if the com.dcsquare.hivemq.spi.topic.sys.SYSTopicEntry could be removed, false otherwise
    boolean removeEntry(final SYSTopicEntry entry);
New to GrepCode? Check out our FAQ X