本文整理了Java中org.apache.qpid.server.model.VirtualHost
类的一些代码示例,展示了VirtualHost
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VirtualHost
类的具体详情如下:
包路径:org.apache.qpid.server.model.VirtualHost
类名称:VirtualHost
暂无
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx
public String getName()
{
return _virtualHost.getName();
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-amqp-1-0-protocol-jdbc-link-store
@Override
public boolean supports(final NamedAddressSpace addressSpace)
{
return (addressSpace instanceof JDBCContainer
|| (addressSpace instanceof VirtualHost
&& ((VirtualHost) addressSpace).getParent() instanceof JDBCContainer));
}
代码示例来源:origin: org.apache.qpid/qpid-bdbstore
protected ListenableFuture<Void> closeVirtualHostIfExist()
{
final VirtualHost<?> virtualHost = getVirtualHost();
if (virtualHost != null)
{
return virtualHost.closeAsync();
}
else
{
return Futures.immediateFuture(null);
}
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
public VirtualHostPrincipal(VirtualHost<?> virtualHost)
{
_virtualHost = virtualHost;
_name = "virtualhost:" + virtualHost.getName() + "-" + virtualHost.getId();
}
代码示例来源:origin: org.apache.qpid/qpid-bdbstore
if (virtualHost instanceof BDBEnvironmentContainer && virtualHost.getState() == State.ACTIVE)
LOGGER.debug("VirtualHost {} has an explicit JE cacheSize of {}", virtualHost.getName(), explicitJECacheSizeForVHost);
totalCacheSize -= explicitJECacheSizeForVHost;
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx
private VirtualHostMBean createVirtualHostMBeanIfNecessary(VirtualHost<?, ?, ?> host, ManagedObjectRegistry _objectRegistry) throws JMException
{
if (!providerMBeanExists(host, _pluginMBeanProvider))
{
host.addChangeListener(_changeListener);
try
{
VirtualHostMBean mbean = new VirtualHostMBean(host, _objectRegistry);
registerMBean(host, _pluginMBeanProvider, mbean);
return mbean;
}
catch (InstanceAlreadyExistsException e)
{
VirtualHostNode parent = host.getParent(VirtualHostNode.class);
Set<ConfiguredObject<?>> registered = _children.keySet();
for (ConfiguredObject<?> object: registered)
{
if (object instanceof VirtualHost && object.getParent(VirtualHostNode.class) == parent)
{
LOGGER.warn("Unexpected MBean is found for VirtualHost " + object + " belonging to node " + parent);
}
}
throw e;
}
}
return null;
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-http
final HttpServletRequest request)
final Model model = virtualHost.getModel();
if(category == VirtualHost.class)
parents.addAll(virtualHost.getConnections());
代码示例来源:origin: org.apache.qpid/qpid-broker-core
public VirtualHostUnavailableException(VirtualHost<?> host)
{
this("Virtualhost state "
+ host.getState()
+ " prevents the message from being sent");
}
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx
private void initConnections()
{
synchronized (_children)
{
for(Connection conn : _virtualHost.getConnections())
{
if(!_children.containsKey(conn))
{
try
{
_children.put(conn, new ConnectionMBean(conn, this));
}
catch(Exception e)
{
LOGGER.error("Cannot create connection mbean for connection " + conn.getName(), e);
}
}
}
}
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx
public VirtualHostMBean(VirtualHost virtualHost, ManagedObjectRegistry registry) throws JMException
{
super(ManagedVirtualHost.class, ManagedVirtualHost.TYPE, registry);
_virtualHost = virtualHost;
virtualHost.addChangeListener(this);
virtualHost.addConnectionAssociationListener(this);
initQueues();
initExchanges();
initConnections();
//This is the actual JMX bean for this 'VirtualHostMBean', leave it alone.
_managerMBean = new VirtualHostManagerMBean(this);
}
代码示例来源: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-plugins-amqp-1-0-protocol-bdb-link-store
@Override
public boolean supports(final NamedAddressSpace addressSpace)
{
if (addressSpace instanceof VirtualHost)
{
if (addressSpace instanceof BDBEnvironmentContainer)
{
return true;
}
else if (((VirtualHost) addressSpace).getParent() instanceof BDBEnvironmentContainer)
{
return true;
}
}
return false;
}
代码示例来源:origin: org.apache.qpid/qpid-broker-core
protected ListenableFuture<Void> closeVirtualHostIfExists()
{
final VirtualHost<?> virtualHost = getVirtualHost();
if (virtualHost != null)
{
return virtualHost.closeAsync();
}
else
{
return Futures.immediateFuture(null);
}
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx
public String getObjectInstanceName()
{
return ObjectName.quote(_virtualHost.getName());
}
代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-amqp-1-0-protocol-jdbc-link-store
@Override
public LinkStore create(final NamedAddressSpace addressSpace)
{
JDBCContainer jdbcContainer = null;
if (addressSpace instanceof JDBCContainer)
{
jdbcContainer = (JDBCContainer) addressSpace;
}
else if (addressSpace instanceof VirtualHost
&& ((VirtualHost) addressSpace).getParent() instanceof JDBCContainer)
{
jdbcContainer = (JDBCContainer) ((VirtualHost) addressSpace).getParent();
}
else
{
throw new StoreException(String.format("Named address space '%s' is not support by link store of type '%s'",
addressSpace.getName(),
TYPE));
}
return new JDBCLinkStore(jdbcContainer);
}
代码示例来源: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-amqp-1-0-protocol-bdb-link-store
@Override
public LinkStore create(final NamedAddressSpace addressSpace)
{
VirtualHost<?> virtualHost = (VirtualHost<?>) addressSpace;
if (virtualHost instanceof BDBEnvironmentContainer)
{
return new BDBLinkStore((BDBEnvironmentContainer<?>) virtualHost);
}
else if (virtualHost.getParent() instanceof BDBEnvironmentContainer)
{
return new BDBLinkStore((BDBEnvironmentContainer<?>) virtualHost.getParent());
}
else
{
throw new StoreException("Cannot create BDB Link Store for " + addressSpace);
}
}
代码示例来源: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
VirtualHostNode<?> virtualHostNode = (VirtualHostNode<?>) vhost.getParent();
final Broker<?> broker = (Broker<?>) virtualHostNode.getParent();
代码示例来源: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());
}
}
内容来源于网络,如有侵权,请联系作者删除!