当前位置: 首页>>代码示例>>Java>>正文


Java ActiveMQDestination.getDestinationType方法代码示例

本文整理汇总了Java中org.apache.activemq.command.ActiveMQDestination.getDestinationType方法的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQDestination.getDestinationType方法的具体用法?Java ActiveMQDestination.getDestinationType怎么用?Java ActiveMQDestination.getDestinationType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.activemq.command.ActiveMQDestination的用法示例。


在下文中一共展示了ActiveMQDestination.getDestinationType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseFilter

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
public static DestinationFilter parseFilter(ActiveMQDestination destination) {
    if (destination.isComposite()) {
        return new CompositeDestinationFilter(destination);
    }
    String[] paths = DestinationPath.getDestinationPaths(destination);
    int idx = paths.length - 1;
    if (idx >= 0) {
        String lastPath = paths[idx];
        if (lastPath.equals(ANY_DESCENDENT)) {
            return new PrefixDestinationFilter(paths, destination.getDestinationType());
        } else {
            while (idx >= 0) {
                lastPath = paths[idx--];
                if (lastPath.equals(ANY_CHILD)) {
                    return new WildcardDestinationFilter(paths, destination.getDestinationType());
                }
            }
        }
    }

    // if none of the paths contain a wildcard then use equality
    return new SimpleDestinationFilter(destination);
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:24,代码来源:DestinationFilter.java

示例2: convert

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
KahaDestination convert(ActiveMQDestination dest) {
    KahaDestination rc = new KahaDestination();
    rc.setName(dest.getPhysicalName());
    switch (dest.getDestinationType()) {
    case ActiveMQDestination.QUEUE_TYPE:
        rc.setType(DestinationType.QUEUE);
        return rc;
    case ActiveMQDestination.TOPIC_TYPE:
        rc.setType(DestinationType.TOPIC);
        return rc;
    case ActiveMQDestination.TEMP_QUEUE_TYPE:
        rc.setType(DestinationType.TEMP_QUEUE);
        return rc;
    case ActiveMQDestination.TEMP_TOPIC_TYPE:
        rc.setType(DestinationType.TEMP_TOPIC);
        return rc;
    default:
        return null;
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:21,代码来源:KahaDBStore.java

示例3: convert

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
KahaDestination convert(ActiveMQDestination dest) {
    KahaDestination rc = new KahaDestination();
    rc.setName(dest.getPhysicalName());
    switch( dest.getDestinationType() ) {
    case ActiveMQDestination.QUEUE_TYPE:
        rc.setType(DestinationType.QUEUE);
        return rc;
    case ActiveMQDestination.TOPIC_TYPE:
        rc.setType(DestinationType.TOPIC);
        return rc;
    case ActiveMQDestination.TEMP_QUEUE_TYPE:
        rc.setType(DestinationType.TEMP_QUEUE);
        return rc;
    case ActiveMQDestination.TEMP_TOPIC_TYPE:
        rc.setType(DestinationType.TEMP_TOPIC);
        return rc;
    default:
        return null;
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:21,代码来源:TempKahaDBStore.java

示例4: getACLs

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
protected Set<GroupPrincipal> getACLs(ActiveMQDestination destination, String roleBase, String roleAttribute) {
    try {
        context = open();
    } catch (NamingException e) {
        LOG.error(e.toString());
        return new HashSet<GroupPrincipal>();
    }



    String destinationBase = "";
    SearchControls constraints = new SearchControls();
    if (AdvisorySupport.isAdvisoryTopic(destination) && useAdvisorySearchBase) {
        destinationBase = advisorySearchBase;
    } else {
        if ((destination.getDestinationType() & ActiveMQDestination.QUEUE_TYPE) == ActiveMQDestination.QUEUE_TYPE) {
            destinationBase = queueSearchMatchingFormat.format(new String[]{destination.getPhysicalName()});
            if (queueSearchSubtreeBool) {
                constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
            } else {
                constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
            }
        }
        if ((destination.getDestinationType() & ActiveMQDestination.TOPIC_TYPE) == ActiveMQDestination.TOPIC_TYPE) {
            destinationBase = topicSearchMatchingFormat.format(new String[]{destination.getPhysicalName()});
            if (topicSearchSubtreeBool) {
                constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
            } else {
                constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
            }
        }
    }

    constraints.setReturningAttributes(new String[] {roleAttribute});

    return getACLs(destinationBase, constraints, roleBase, roleAttribute);
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:38,代码来源:LDAPAuthorizationMap.java

示例5: getDestinationAdvisoryTopic

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
public static ActiveMQTopic getDestinationAdvisoryTopic(ActiveMQDestination destination) {
    switch (destination.getDestinationType()) {
        case ActiveMQDestination.QUEUE_TYPE:
            return QUEUE_ADVISORY_TOPIC;
        case ActiveMQDestination.TOPIC_TYPE:
            return TOPIC_ADVISORY_TOPIC;
        case ActiveMQDestination.TEMP_QUEUE_TYPE:
            return TEMP_QUEUE_ADVISORY_TOPIC;
        case ActiveMQDestination.TEMP_TOPIC_TYPE:
            return TEMP_TOPIC_ADVISORY_TOPIC;
        default:
            throw new RuntimeException("Unknown destination type: " + destination.getDestinationType());
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:15,代码来源:AdvisorySupport.java

示例6: getRegion

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
protected Region getRegion(ActiveMQDestination destination) throws JMSException {
    switch (destination.getDestinationType()) {
        case ActiveMQDestination.QUEUE_TYPE:
            return queueRegion;
        case ActiveMQDestination.TOPIC_TYPE:
            return topicRegion;
        case ActiveMQDestination.TEMP_QUEUE_TYPE:
            return tempQueueRegion;
        case ActiveMQDestination.TEMP_TOPIC_TYPE:
            return tempTopicRegion;
        default:
            throw createUnknownDestinationTypeException(destination);
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:15,代码来源:RegionBroker.java

示例7: matches

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
public boolean matches(ActiveMQDestination destination) {
	if (destination.getDestinationType() != destinationType) return false;
    String[] path = DestinationPath.getDestinationPaths(destination.getPhysicalName());
    int length = prefixes.length;
    if (path.length >= length) {
        int size = length - 1;
        for (int i = 0; i < size; i++) {
            if (!path[i].equals(ANY_CHILD) && !prefixes[i].equals(ANY_CHILD) && !prefixes[i].equals(path[i])) {
                return false;
            }
        }
        return true;
    }
    return false;
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:16,代码来源:PrefixDestinationFilter.java

示例8: matches

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
public boolean matches(ActiveMQDestination destination) {
	if (destination.getDestinationType() != destinationType) return false;
    String[] path = DestinationPath.getDestinationPaths(destination);
    int length = prefixes.length;
    if (path.length == length) {
        for (int i = 0; i < length; i++) {
            String prefix = prefixes[i];
            if (prefix != null && !prefix.equals(path[i])) {
                return false;
            }
        }
        return true;
    }
    return false;
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:16,代码来源:WildcardDestinationFilter.java

示例9: createUnknownDestinationTypeException

import org.apache.activemq.command.ActiveMQDestination; //导入方法依赖的package包/类
protected JMSException createUnknownDestinationTypeException(ActiveMQDestination destination) {
    return new JMSException("Unknown destination type: " + destination.getDestinationType());
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:4,代码来源:RegionBroker.java


注:本文中的org.apache.activemq.command.ActiveMQDestination.getDestinationType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。