org.apache.qpid.server.model.Broker类的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中org.apache.qpid.server.model.Broker类的一些代码示例,展示了Broker类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Broker类的具体详情如下:
包路径:org.apache.qpid.server.model.Broker
类名称:Broker

Broker介绍

暂无

代码示例

代码示例来源:origin: com.dell.cpsd/common-testing

/**
 * Gets default virtual host, should be the only one.
 */
public VirtualHost getVHost()
{
  return BROKER.getBroker().findVirtualHostByName("default");
}

代码示例来源:origin: org.apache.qpid/qpid-bdbstore

private EventLogger getEventLogger()
{
  return _broker.getEventLogger();
}

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-websocket

private void reportUnexpectedByteBufferSizeUsage()
{
  if (!_unexpectedByteBufferSizeReported)
  {
    LOGGER.info("At least one frame unexpectedly does not fit into default byte buffer size ({}B) on a connection {}.",
          _broker.getNetworkBufferSize(), this.toString());
    _unexpectedByteBufferSizeReported = true;
  }
}

代码示例来源:origin: org.apache.qpid/qpid-broker-core

@Override
  public void childRemoved(final ConfiguredObject<?> object, final ConfiguredObject<?> child)
  {
    if (child == vhost)
    {
      broker.removeChangeListener(brokerListener);
      object.removeChangeListener(this);
      broker.getChildren(TrustStore.class).forEach(t -> t.removeChangeListener(trustStoreChangeListener));
    }
  }
});

代码示例来源:origin: org.apache.qpid/qpid-broker-core

@Override
  public void stateChanged(final ConfiguredObject<?> object, final State oldState, final State newState)
  {
    if (newState == State.ACTIVE)
    {
      _checkExpiryTaskFuture =
          getBroker().scheduleHouseKeepingTask(frequency, TimeUnit.DAYS,
                             () -> checkCertificateExpiry());
      getBroker().removeChangeListener(this);
    }
  }
});

代码示例来源: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-plugins-management-jmx

Broker<?> broker = getBroker();
RmiPort registryPort = getEligibleJmxPort(RmiPort.class, broker.getPorts(), Protocol.RMI);
JmxPort connectorPort = getEligibleJmxPort(JmxPort.class, broker.getPorts(), Protocol.JMX_RMI);
if (registryPort == null || connectorPort == null)
  broker.addChangeListener(_changeListener);
    for (VirtualHostNode<?> virtualHostNode : broker.getVirtualHostNodes())
    Collection<AuthenticationProvider<?>> authenticationProviders = broker.getAuthenticationProviders();
    for (AuthenticationProvider<?> authenticationProvider : authenticationProviders)
    Collection<BrokerLogger> brokerLoggers = broker.getChildren(BrokerLogger.class);
    for (BrokerLogger brokerLogger : brokerLoggers)

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-http

@Override
protected ListenableFuture<Void> onClose()
{
  getBroker().removeChangeListener(_brokerChangeListener);
  if (_server != null)
  {
    try
    {
      logOperationalShutdownMessage();
      _server.stop();
    }
    catch (Exception e)
    {
      throw new ServerScopedRuntimeException("Failed to stop HTTP management", e);
    }
  }
  if (_jettyServerExecutor != null)
  {
    _jettyServerExecutor.shutdown();
  }
  getBroker().getEventLogger().message(ManagementConsoleMessages.STOPPED(OPERATIONAL_LOGGING_NAME));
  return Futures.immediateFuture(null);
}

代码示例来源:origin: org.apache.qpid/qpid-broker-core

modifiedProperties.put(ServerPropertyNames.VERSION, CommonProperties.getReleaseVersion());
modifiedProperties.put(ServerPropertyNames.QPID_BUILD, CommonProperties.getBuildVersion());
modifiedProperties.put(ServerPropertyNames.QPID_INSTANCE_NAME, broker.getName());
modifiedProperties.put(ConnectionStartProperties.QPID_VIRTUALHOST_PROPERTIES_SUPPORTED,
            String.valueOf(broker.isVirtualHostPropertiesNodeEnabled()));
            String.valueOf(broker.isMessageCompressionEnabled()));
modifiedProperties.put(ConnectionStartProperties.QPID_QUEUE_LIFETIME_SUPPORTED, Boolean.TRUE.toString());
  case AMQP_0_10:
    modifiedProperties.put(ServerPropertyNames.FEDERATION_TAG, broker.getId().toString());
    final List<String> features = getFeatures(broker);
    if (features.size() > 0)

代码示例来源:origin: org.apache.qpid/qpid-broker-core

void initializeExpiryChecking()
{
  int checkFrequency = getCertificateExpiryCheckFrequency();
  if(getBroker().getState() == State.ACTIVE)
  {
    _checkExpiryTaskFuture = getBroker().scheduleHouseKeepingTask(checkFrequency, TimeUnit.DAYS,
                                   this::checkCertificateExpiry);
  }
  else
  {
    final int frequency = checkFrequency;
    getBroker().addChangeListener(new AbstractConfigurationChangeListener()
    {
      @Override
      public void stateChanged(final ConfiguredObject<?> object, final State oldState, final State newState)
      {
        if (newState == State.ACTIVE)
        {
          _checkExpiryTaskFuture =
              getBroker().scheduleHouseKeepingTask(frequency, TimeUnit.DAYS,
                                 () -> checkCertificateExpiry());
          getBroker().removeChangeListener(this);
        }
      }
    });
  }
}

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-http

Collection<HttpPort<?>> httpPorts = getEligibleHttpPorts(getBroker().getPorts());
if (httpPorts.isEmpty())
  getBroker().getEventLogger().message(ManagementConsoleMessages.STARTUP(OPERATIONAL_LOGGING_NAME));
    getBroker().getEventLogger().message(PortMessages.BIND_FAILED("HTTP", e.getAddress().getPort()));
    throw e;
  getBroker().getEventLogger().message(ManagementConsoleMessages.READY(OPERATIONAL_LOGGING_NAME));

代码示例来源:origin: org.apache.qpid/qpid-bdbstore

long totalCacheSize = broker.getContextValue(Long.class, BDBVirtualHost.QPID_BROKER_BDB_TOTAL_CACHE_SIZE);
Collection<VirtualHostNode<?>> nodes = broker.getVirtualHostNodes();
Collection<BDBEnvironmentContainer> bdbEnvironmentContainers = new HashSet<>();
for (VirtualHostNode<?> virtualHostNode: nodes)

代码示例来源:origin: org.apache.qpid/qpid-broker-core

@Override
  public void onFailure(final Throwable t)
  {
    setState(State.ERRORED);
    if (((Broker) getParent()).isManagementMode())
    {
      LOGGER.warn("Failed to make {} active.", this, t);
      resultFuture.set(null);
    }
    else
    {
      resultFuture.setException(t);
    }
  }
}, getTaskExecutor());

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx

VirtualHost<?,?,?> virtualHost = _broker.findVirtualHostByName(virtualHostName);
  if (virtualHost == null)
Operation operation = (isAccessMethod(methodName) || impact == MBeanOperationInfo.INFO) ? Operation.ACCESS : Operation.UPDATE;
SecurityManager security = _broker.getSecurityManager();
security.authoriseMethod(operation, type, methodName, virtualHostName);

代码示例来源:origin: org.apache.qpid/qpid-broker-core

final Broker<?> broker = (Broker<?>) virtualHostNode.getParent();
final Collection<TrustStore> trustStores = broker.getChildren(TrustStore.class);
broker.addChangeListener(brokerListener);
virtualHostNode.addChangeListener(new AbstractConfigurationChangeListener()

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-amqp-0-8-protocol

public AMQPConnection_0_8Impl(Broker<?> broker,
               ServerNetworkConnection network,
               AmqpPort<?> port,
               Transport transport,
               Protocol protocol,
               long connectionId,
               AggregateTicker aggregateTicker)
{
  super(broker, network, port, transport, protocol, connectionId, aggregateTicker);
  _maxNoOfChannels = port.getSessionCountLimit();
  _decoder = new BrokerDecoder(this);
  _binaryDataLimit = getBroker().getContextKeys(false).contains(BROKER_DEBUG_BINARY_DATA_LENGTH)
      ? getBroker().getContextValue(Integer.class, BROKER_DEBUG_BINARY_DATA_LENGTH)
      : DEFAULT_DEBUG_BINARY_DATA_LENGTH;
  String sendQueueDeleteOkRegardlessRegexp = getBroker().getContextKeys(false).contains(Broker.SEND_QUEUE_DELETE_OK_REGARDLESS_CLIENT_VER_REGEXP)
      ? getBroker().getContextValue(String.class, Broker.SEND_QUEUE_DELETE_OK_REGARDLESS_CLIENT_VER_REGEXP): "";
  _sendQueueDeleteOkRegardlessClientVerRegexp = Pattern.compile(sendQueueDeleteOkRegardlessRegexp);
  _sender = network.getSender();
  _closeWhenNoRoute = port.getCloseWhenNoRoute();
}

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-amqp-0-10-protocol

public boolean isCompressionSupported()
{
  return _compressionSupported && _broker.isMessageCompressionEnabled();
}

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-amqp-0-10-protocol

public ServerSession(ServerConnection connection, ServerSessionDelegate delegate, Binary name, long expiry)
{
  this.connection = connection;
  this.delegate = delegate;
  this.name = name;
  this.closing = false;
  this._isNoReplay = false;
  initReceiver();
  _transaction = new AsyncAutoCommitTransaction(this.getMessageStore(),this);
  _blockingTimeout = connection.getBroker().getContextValue(Long.class, Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT);
}

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-jmx

@Override
protected void onClose()
{
  synchronized (_childrenLock)
  {
    for(ConfiguredObject<?> object : _children.keySet())
    {
      unregisterObjectMBeans(object);
    }
    _children.clear();
  }
  getBroker().removeChangeListener(_changeListener);
  closeObjectRegistry();
  _loggingManagementMBean = null;
}

代码示例来源:origin: org.apache.qpid/qpid-broker-plugins-management-http

@Override
protected void onOpen()
{
  super.onOpen();
  _serveUncompressedDojo = Boolean.TRUE.equals(getContextValue(Boolean.class, "qpid.httpManagement.serveUncompressedDojo"));
  _saslExchangeExpiry = getContextValue(Long.class, SASL_EXCHANGE_EXPIRY_CONTEXT_NAME);
  getBroker().addChangeListener(_brokerChangeListener);
}

相关文章