gpt4 book ai didi

org.jivesoftware.openfire.XMPPServer.getConnectionManager()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 00:58:40 26 4
gpt4 key购买 nike

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

XMPPServer.getConnectionManager介绍

[英]Returns the ConnectionManager registered with this server. The ConnectionManager was registered with the server as a module while starting up the server.
[中]返回在此服务器上注册的ConnectionManager。启动服务器时,ConnectionManager已作为模块注册到服务器。

代码示例

代码示例来源:origin: igniterealtime/Openfire

/**
 * @deprecated Obtain and use the corresponding {@link org.jivesoftware.openfire.spi.ConnectionListener} instead.
 */
@Deprecated
public static int getServicePort() {
  ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
  return connectionManager.getComponentListenerPort();
}

代码示例来源:origin: igniterealtime/Openfire

/**
 * @deprecated Obtain and use the corresponding {@link org.jivesoftware.openfire.spi.ConnectionListener} instead.
 */
@Deprecated
public static boolean isServiceEnabled() {
  ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
  return connectionManager.isComponentListenerEnabled();
}

代码示例来源:origin: igniterealtime/Openfire

/**
 * @deprecated Obtain and use the corresponding {@link org.jivesoftware.openfire.spi.ConnectionListener} instead.
 */
@Deprecated
public static void setServiceEnabled(boolean enabled) throws ModificationNotAllowedException {
  // Alert listeners about this event
  for (ExternalComponentManagerListener listener : listeners) {
    listener.serviceEnabled(enabled);
  }
  ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
  connectionManager.enableComponentListener(enabled);
}

代码示例来源:origin: igniterealtime/Openfire

/**
 * @deprecated Obtain and use the corresponding {@link org.jivesoftware.openfire.spi.ConnectionListener} instead.
 */
@Deprecated
public static void setServicePort(int port) throws ModificationNotAllowedException {
  // Alert listeners about this event
  for (ExternalComponentManagerListener listener : listeners) {
    listener.portChanged(port);
  }
  ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
  connectionManager.setComponentListenerPort(port);
}

代码示例来源:origin: igniterealtime/Openfire

@Override
public ConnectionConfiguration getConfiguration()
{
  // Here, a client-to-server configuration is mocked. It is likely not used, as actual connection handling takes
  // place at the connection manager.
  final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
  return connectionManager.getListener( ConnectionType.SOCKET_C2S, true ).generateConnectionConfiguration();
}

代码示例来源:origin: igniterealtime/Openfire

@Override
public ConnectionConfiguration getConfiguration() {
  if (configuration == null) {
    final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
    configuration = connectionManager.getListener( connectionType, true ).generateConnectionConfiguration();
  }
  return configuration;
}

代码示例来源:origin: igniterealtime/Openfire

@Override
public ConnectionConfiguration getConfiguration() {
  if (configuration == null) {
    final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
    configuration = connectionManager.getListener( connectionType, true ).generateConnectionConfiguration();
  }
  return configuration;
}

代码示例来源:origin: igniterealtime/Openfire

@Override
public ConnectionConfiguration getConfiguration()
{
  // This is an ugly hack to get backwards compatibility with the pre-MINA era. As this implementation is being
  // removed (it is marked as deprecated - at the time of writing, it is only used for S2S). The ugly hack: assume
  // S2S:
  final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
  return connectionManager.getListener( ConnectionType.SOCKET_S2S, false ).generateConnectionConfiguration();
}

代码示例来源:origin: igniterealtime/Openfire

XMPPServer.getInstance().getConnectionManager().getClientListenerPort() +
CROSS_DOMAIN_END_TEXT+"\u0000");

代码示例来源:origin: igniterealtime/Openfire

ConnectionListener getConnectionListener( ConnectionType type ) {
  ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
  return connectionManager.getListener( type, getTLSPolicy().equals( Connection.TLSPolicy.legacyMode ) );
}

代码示例来源:origin: igniterealtime/Openfire

private static StringBuilder getPortList(StringBuilder builder) {
  boolean multiple = false;
  if(XMPPServer.getInstance().getConnectionManager().getClientListenerPort() > 0) {
    builder.append(XMPPServer.getInstance().getConnectionManager().getClientListenerPort());
    multiple = true;
  if(XMPPServer.getInstance().getConnectionManager().getClientSSLListenerPort() > 0) {
    if(multiple) {
      builder.append(',');
    builder.append(XMPPServer.getInstance().getConnectionManager().getClientSSLListenerPort());
    multiple = true;

代码示例来源:origin: igniterealtime/Openfire

final ConnectionManagerImpl connectionManager = ( (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager() );
final TLSStreamHandler tlsStreamHandler = new TLSStreamHandler( socket, connectionManager.getListener( ConnectionType.SOCKET_S2S, directTLS ).generateConnectionConfiguration(), true );

代码示例来源:origin: igniterealtime/Openfire

final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
for ( ConnectionListener connectionListener : connectionManager.getListeners( type ) ) {
  try {

代码示例来源:origin: igniterealtime/Openfire

private boolean isHttpCompressionEnabled() {
  final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
  final ConnectionConfiguration configuration = connectionManager.getListener( ConnectionType.BOSH_C2S, true ).generateConnectionConfiguration();
  return configuration.getCompressionPolicy() == null || configuration.getCompressionPolicy().equals( Connection.CompressionPolicy.optional );
}

代码示例来源:origin: igniterealtime/Openfire

final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
for ( ConnectionListener connectionListener : connectionManager.getListeners( type ) ) {
  try {

代码示例来源:origin: igniterealtime/Openfire

private Connector createSSLConnector( final Server httpBindServer ) {
  final int securePort = getHttpBindSecurePort();
  try {
    final IdentityStore identityStore = XMPPServer.getInstance().getCertificateStoreManager().getIdentityStore( ConnectionType.BOSH_C2S );
    if (securePort > 0 && identityStore.getStore().aliases().hasMoreElements() ) {
      if ( !identityStore.containsDomainCertificate( ) ) {
        Log.warn("HTTP binding: Using certificates but they are not valid for the hosted domain");
      }
      final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
      final ConnectionConfiguration configuration = connectionManager.getListener( ConnectionType.BOSH_C2S, true ).generateConnectionConfiguration();
      final SslContextFactory sslContextFactory = new EncryptionArtifactFactory(configuration).getSslContextFactory();
      final HttpConfiguration httpsConfig = new HttpConfiguration();
      httpsConfig.setSecureScheme("https");
      httpsConfig.setSecurePort(securePort);
      configureProxiedConnector(httpsConfig);
      httpsConfig.addCustomizer(new SecureRequestCustomizer());
      final ServerConnector sslConnector = new ServerConnector(httpBindServer, new SslConnectionFactory(sslContextFactory, "http/1.1"), new HttpConnectionFactory(httpsConfig));
      sslConnector.setHost(getBindInterface());
      sslConnector.setPort(securePort);
      return sslConnector;
    }
  }
  catch (Exception e) {
    Log.error("Error creating SSL connector for Http bind", e);
  }
  return null;
}

代码示例来源:origin: igniterealtime/Openfire

XMPPServer.getInstance().getConnectionManager().getClientListenerPort() +
    FlashCrossDomainServlet.CROSS_DOMAIN_END_TEXT + '\0';
connection.deliverRawText(crossDomainText);

代码示例来源:origin: igniterealtime/Openfire

int clientPortNum = -1;
int componentPortNum = -1;
final ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
if ( connectionManager != null )

代码示例来源:origin: igniterealtime/Openfire

final ConnectionManagerImpl connectionManager = ( (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager() );
final ConnectionConfiguration configuration = connectionManager.getListener( ConnectionType.WEBADMIN, true ).generateConnectionConfiguration();
final SslContextFactory sslContextFactory = new EncryptionArtifactFactory( configuration ).getSslContextFactory();

代码示例来源:origin: igniterealtime/Openfire

final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
final ConnectionConfiguration configuration = connectionManager.getListener( ConnectionType.SOCKET_C2S, false ).generateConnectionConfiguration();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com