本文整理了Java中org.apache.qpid.server.model.VirtualHost.getName()
方法的一些代码示例,展示了VirtualHost.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VirtualHost.getName()
方法的具体详情如下:
包路径:org.apache.qpid.server.model.VirtualHost
类名称:VirtualHost
方法名:getName
暂无
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx
public String getName()
{
return _virtualHost.getName();
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
public HouseKeepingTask(String name, VirtualHost vhost, AccessControlContext context)
{
_name = name == null ? vhost.getName() + ":" + this.getClass().getSimpleName() : name;
_accessControlContext = context;
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
public VirtualHostPrincipal(VirtualHost<?> virtualHost)
{
_virtualHost = virtualHost;
_name = "virtualhost:" + virtualHost.getName() + "-" + virtualHost.getId();
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx
public String getObjectInstanceName()
{
return ObjectName.quote(_virtualHost.getName());
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
@Override
public VirtualHost<?> findVirtualHostByName(String name)
{
for (VirtualHostNode<?> virtualHostNode : getChildren(VirtualHostNode.class))
{
VirtualHost<?> virtualHost = virtualHostNode.getVirtualHost();
if (virtualHost != null && virtualHost.getName().equals(name))
{
return virtualHost;
}
}
return null;
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-http
private Queue<?> getQueueFromRequest(final List<String> pathInfoElements)
{
if (pathInfoElements.size() < 2)
{
throw new IllegalArgumentException("Invalid path is specified");
}
String vhostName = pathInfoElements.get(0);
String queueName = pathInfoElements.get(1);
VirtualHost<?> vhost = getBroker().findVirtualHostByName(vhostName);
if (vhost == null)
{
throw new IllegalArgumentException("Could not find virtual host with name '" + vhostName + "'");
}
Queue queueFromVirtualHost = getQueueFromVirtualHost(queueName, vhost);
if (queueFromVirtualHost == null)
{
throw new IllegalArgumentException("Could not find queue with name '" + queueName + "' on virtual host '" + vhost.getName() + "'");
}
return queueFromVirtualHost;
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
/** Create an ExchangeLogSubject that Logs in the following format. */
public ExchangeLogSubject(Exchange<?> exchange, VirtualHost<?> vhost)
{
setLogStringWithFormat(EXCHANGE_FORMAT, vhost.getName(),
exchange.getType(), exchange.getName());
}
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
@Override
public NamedAddressSpace getAddressSpace(final String name)
{
Broker<?> broker = getAncestor(Broker.class);
NamedAddressSpace addressSpace = broker.getSystemAddressSpace(name);
if(addressSpace == null)
{
for (VirtualHostNode<?> vhn : broker.getVirtualHostNodes())
{
VirtualHost<?> vh = vhn.getVirtualHost();
if (vh != null && vh.getName().equals(name))
{
addressSpace = vh;
break;
}
}
}
return addressSpace;
}
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
/**
* Create a BindingLogSubject that Logs in the following format.
*
* [ vh(/)/ex(amq.direct)/qu(testQueue)/bd(testQueue) ]
*
* @param routingKey
* @param exchange
* @param queue
*/
public BindingLogSubject(String routingKey, Exchange<?> exchange,
Queue<?> queue)
{
VirtualHost<?> virtualHost = queue.getVirtualHost();
setLogStringWithFormat(BINDING_FORMAT,
virtualHost.getName(),
exchange.getType(),
exchange.getName(),
queue.getName(),
routingKey);
}
代码示例来源:origin: org.apache.qpid/qpid-bdbstore
LOGGER.debug("VirtualHost {} has an explicit JE cacheSize of {}", virtualHost.getName(), explicitJECacheSizeForVHost);
totalCacheSize -= explicitJECacheSizeForVHost;
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-access-control
final String virtualHostName = virtualHost.getName();
properties.setName(methodName);
properties.put(ObjectProperties.Property.COMPONENT, buildHierarchicalCategoryName(queue, virtualHost));
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-access-control
private ObjectProperties createObjectPropertiesForMethod(final PermissionedObject permissionedObject,
final String methodName)
{
ObjectProperties properties = new ObjectProperties(permissionedObject.getName());
properties.put(ObjectProperties.Property.METHOD_NAME, methodName);
if (permissionedObject instanceof ConfiguredObject<?>)
{
ConfiguredObject<?> configuredObject = ((ConfiguredObject) permissionedObject);
Model model = configuredObject.getModel();
VirtualHost<?> virtualHost = model.getAncestor(VirtualHost.class, configuredObject);
final String componentName;
if (virtualHost != null)
{
properties.put(ObjectProperties.Property.VIRTUALHOST_NAME, virtualHost.getName());
componentName = buildHierarchicalCategoryName(configuredObject, virtualHost);
}
else
{
componentName = buildHierarchicalCategoryName(configuredObject, model.getAncestor(Broker.class, configuredObject));
}
properties.put(ObjectProperties.Property.COMPONENT, componentName);
final String createdBy = (String) configuredObject.getAttribute(ConfiguredObject.CREATED_BY);
if (createdBy != null)
{
properties.put(ObjectProperties.Property.CREATED_BY, createdBy);
}
}
return properties;
}
内容来源于网络,如有侵权,请联系作者删除!