• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Unbind类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.felix.ipojo.annotations.Unbind的典型用法代码示例。如果您正苦于以下问题:Java Unbind类的具体用法?Java Unbind怎么用?Java Unbind使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Unbind类属于org.apache.felix.ipojo.annotations包,在下文中一共展示了Unbind类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: unregister

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Unregisters the Service.
 *
 * @param controller
 *            The controller.
 */
@Unbind(id = "controllerRegistry", optional = true, aggregate = true)
public void unregister(Controller controller) {
    mapper.unregisterController(controller);
    // remove startpage mapping if necessary
    StartpageController startpageMarker = controller.getClass().getAnnotation(
            StartpageController.class);
    if (startpageMarker != null) {
        getStartpageRegistry().unregisterStartpageController(controller);
    }
    UrlMapping mapping = controller.getClass().getAnnotation(UrlMapping.class);
    if (mapping != null && mapping.value().startsWith("/*/admin/")) {
        Page page = controller.getClass().getAnnotation(Page.class);
        if (page != null && StringUtils.isNotBlank(page.submenu())) {
            WebServiceLocator.findService(AdministrationMenuManager.class)
                    .removeFromExtensionSection(page.submenu());
        }
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:25,代码来源:DynamicUrlHandlerMappingRegistry.java


示例2: unbindTransport

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * A transport implementation has gone away
 *
 * @param aTransport
 *            A transport implementation
 * @param aReference
 *            The injected service reference
 */
@Unbind(id = ID_TRANSPORTS)
protected void unbindTransport(final ITransport aTransport,
		final ServiceReference<ITransport> aReference) {

	final String accessId = (String) aReference
			.getProperty(IConstants.PROP_ACCESS_ID);
	if (accessId == null || accessId.isEmpty()) {
		// Ignore invalid access IDs
		return;
	}

	synchronized (pTransports) {
		// Forget about the service
		pTransports.remove(accessId);

		if (pTransports.isEmpty() && pSvcRegistration != null) {
			// No more transport service: we can't provide the service
			pSvcRegistration.unregister();
			pSvcRegistration = null;
		}
	}
}
 
开发者ID:cohorte,项目名称:cohorte-herald,代码行数:31,代码来源:Herald.java


示例3: unbindDirectory

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * A transport directory has gone away
 *
 * @param aDirectory
 *            A transport directory
 * @param aReference
 *            The injected service reference
 */
@Unbind(id = ID_DIRECTORIES)
protected synchronized void unbindDirectory(
        final ITransportDirectory aDirectory,
        final ServiceReference<ITransportDirectory> aReference) {

    final String accessId = (String) aReference
            .getProperty(IConstants.PROP_ACCESS_ID);
    if (accessId == null || accessId.isEmpty()) {
        // Ignore invalid access IDs
        return;
    }

    // Forget about the service
    pDirectories.remove(accessId);

    // Update accesses
    for (final Peer peer : pPeers.values()) {
        final Access currentAccess = peer.getAccess(accessId);
        if (currentAccess != null) {
            peer.setAccess(accessId,
                    new RawAccess(accessId, currentAccess.dump()));
        }
    }
}
 
开发者ID:cohorte,项目名称:cohorte-herald,代码行数:33,代码来源:Directory.java


示例4: removeNoteContentPreProcessor

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Removes the given processor from the list of processors.
 * 
 * @param noteRenderingPreProcessor
 *            The processor.
 */
@Unbind(id = "registerContentProcessor", optional = true, aggregate = true)
public void removeNoteContentPreProcessor(
        NoteContentRenderingPreProcessor noteRenderingPreProcessor) {
    ServiceLocator.findService(NoteRenderingPreProcessorManager.class).removeProcessor(
            noteRenderingPreProcessor);
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:13,代码来源:NoteRenderingPreProcessorRegistry.java


示例5: removeNoteMetadataPreProcessor

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Removes the given processor from the list of processors.
 * 
 * @param noteRenderingPreProcessor
 *            The processor.
 */
@Unbind(id = "registerProcessor", optional = true, aggregate = true)
public void removeNoteMetadataPreProcessor(
        NoteMetadataRenderingPreProcessor noteRenderingPreProcessor) {
    ServiceLocator.findService(NoteRenderingPreProcessorManager.class).removeProcessor(
            noteRenderingPreProcessor);
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:13,代码来源:NoteRenderingPreProcessorRegistry.java


示例6: removePermissionFilter

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Removes the given filter.
 * 
 * @param permissionFilter
 *            The filter to remove.
 */
@Unbind(id = "registerFilter", optional = true, aggregate = true)
public void removePermissionFilter(NotePermissionFilter permissionFilter) {
    ServiceLocator.instance().getService(NotePermissionManagement.class)
            .removePermissionFilter(permissionFilter);
    LOGGER.debug("Removed note permission filter {}", permissionFilter.getClass().getName());
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:13,代码来源:NotePermissionFilterRegistry.java


示例7: removeAttachmentStoringPreProcessor

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Removes the given processor from the list of processors.
 * 
 * @param attachmentStoringPreProcessor
 *            The processor.
 */
@Unbind(id = "registerAttachmentStoringPreProcessor", optional = true, aggregate = true)
public void removeAttachmentStoringPreProcessor(
        AttachmentStoringPreProcessor attachmentStoringPreProcessor) {
    ServiceLocator.instance().getService(ResourceStoringManagement.class)
            .removeAttachmentStoringPreProcessor(attachmentStoringPreProcessor);
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:13,代码来源:AttachmentStoringPreProcessorRegistry.java


示例8: unbindMessageConsumer

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * is invoked, when a provider message consumer is removed from the OSGi context. This method
 * stops appropriate JMS message consumer
 * 
 * @param consumer
 *            the consumer
 */
@Unbind(aggregate = true)
public void unbindMessageConsumer(ProviderMessageConsumer consumer) {
    JMSMessageConsumer consumerToBeRemoved = jmsMessageConsumers
            .remove(consumer);
    if (consumerToBeRemoved != null) {
        consumerToBeRemoved.stop();
        LOG.debug("JMS message consumer has been closed");
    } else {
        LOG.warn("JMS message consumer for the removed provider message "
                + "consumer was not found. ProviderMessageConsumer == "
                + consumer);
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:21,代码来源:ConsumerFactory.java


示例9: unbindEmbeddedConfiguration

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Remove the embedded configuration
 * 
 * @param embeddedConfiguration
 *            the configuration to remove
 */
@Unbind
public synchronized void unbindEmbeddedConfiguration(
        ActiveMQEmbeddedConfiguration embeddedConfiguration) {
    this.embeddedConfiguration = null;
    if (callback != null) {
        callback.onConfigurationChanged();
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:15,代码来源:ActiveMQAdapterConfiguration.java


示例10: unbindMessageHandler

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * 
 * Is invoked when a communote message handler is removed from the OSGi context. The method is
 * responsible for stopping appropriate provider message consumer instance
 * 
 * @param messageHandler
 *            message handler, that was removed
 */
@Override
@Unbind
public void unbindMessageHandler(
        CommunoteMessageHandler<? extends BaseMessage> messageHandler) {
    ComponentInstance consumerToBeRemoved = messageConsumers.remove(messageHandler);
    if (consumerToBeRemoved != null) {
        consumerToBeRemoved.dispose();
        LOG.debug("Provider message consumer has been unbound");
    } else {
        LOG.warn("Provider message consumer for the removed message handler was not found. MessageHandler == "
                + messageHandler);
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:22,代码来源:ProviderMessageConsumerFactoryImpl.java


示例11: unbindHttp

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
@Unbind
void unbindHttp(HttpService http) {
  Map<String, Servlet> snapshot;
  
  synchronized( servlets ) {
    snapshot = new HashMap<String, Servlet>(servlets);
    services.remove(http);
  }
  
  for ( String ctx : snapshot.keySet() ) {
    http.unregister(ctx);
  }
}
 
开发者ID:mcculls,项目名称:osgi-in-action,代码行数:14,代码来源:ServletManager.java


示例12: unbindServlet

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
@Unbind
void unbindServlet(Servlet servlet, Map attrs) {
  String ctx = (String) attrs.get("Web-ContextPath");
  if ( ctx != null ) {
    LinkedList<HttpService> snapshot;
    synchronized( servlets ) {
      servlets.remove(ctx);
      snapshot = new LinkedList<HttpService>(services);
    }
    
    for ( HttpService s : snapshot ) {
      s.unregister(ctx);
    }
  }
}
 
开发者ID:mcculls,项目名称:osgi-in-action,代码行数:16,代码来源:ServletManager.java


示例13: unbindShape

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Removes a no longer available <tt>SimpleShape</tt> from the drawing frame.
 * 
 * @param name The name of the <tt>SimpleShape</tt> to remove.
 **/
@Unbind(aggregate=true)
public void unbindShape(SimpleShape shape, Map attrs) {
  final String name = (String) attrs.get(SimpleShape.NAME_PROPERTY);
  if ( name == null ) return;

  DefaultShape delegate = null;
  
  synchronized( m_shapes ) {
    delegate = (DefaultShape) m_shapes.remove(name);
  }
  
  if ( delegate != null ) {
    delegate.dispose();
    SwingUtils.invokeAndWait( new Runnable() {
      public void run() {
        if ((m_selected != null) && m_selected.equals(name)) {
          m_selected = null;
        }
    
        for (int i = 0; i < m_toolbar.getComponentCount(); i++) {
          JButton sb = (JButton) m_toolbar.getComponent(i);
          if (sb.getActionCommand().equals(name)) {
            m_toolbar.remove(i);
            m_toolbar.invalidate();
            validate();
            repaint();
            break;
          }
        }
    
        if ((m_selected == null) && (m_toolbar.getComponentCount() > 0)) {
          ((JButton) m_toolbar.getComponent(0)).doClick();
        }
      }      
    });
  }
}
 
开发者ID:mcculls,项目名称:osgi-in-action,代码行数:43,代码来源:PaintFrame.java


示例14: unbindIHerald

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * Called when herald is unbind
 */
@Unbind(id = "herald-core")
public void unbindIHerald() {
	if (pHerald != null) {
		pHerald.removeMessageListener(this);
	}
}
 
开发者ID:cohorte,项目名称:cohorte-herald,代码行数:10,代码来源:HeraldRpcExporter.java


示例15: unbindHttpService

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
/**
 * HTTP service gone
 */
@Unbind(id = IPOJO_ID_HTTP)
private void unbindHttpService() {

    // Forget the port
    pHttpPort = 0;
}
 
开发者ID:cohorte,项目名称:cohorte-herald,代码行数:10,代码来源:HttpReceiver.java


示例16: unbindStrategy

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
@Unbind
private void unbindStrategy(IStrategy strategy) {
	logService.log(LogService.LOG_INFO, "remove strategy - " + strategy.getTitle());
	if(currentStrategy.getTitle().equals(strategy.getTitle())){
		currentStrategy = null;
	}
	strategies.remove(strategy.getTitle());
	updateListeners();	
}
 
开发者ID:burningrain,项目名称:planetBot,代码行数:10,代码来源:StrategiesImpl.java


示例17: unbindExtension

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
@Unbind
public void unbindExtension(final Component extension) {
    doAccess(new Runnable() {
        @Override
        public void run() {
            tabSheet.removeComponent(extension);
        }
    });
}
 
开发者ID:peergreen,项目名称:vaadin-osgi,代码行数:10,代码来源:BaseVaadinUI.java


示例18: removeHttpService

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
@Unbind(id="http")
 protected void removeHttpService(HttpService service) {
   unregister(service);
}
 
开发者ID:mcculls,项目名称:osgi-in-action,代码行数:5,代码来源:ResourceBinder.java


示例19: unbindWindow

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
@Unbind(filter="(name=main)")
void unbindWindow(Window window) {
  m_log.log( LogService.LOG_INFO, "Unbind window" );
  window.removeWindowListener(this);
}
 
开发者ID:mcculls,项目名称:osgi-in-action,代码行数:6,代码来源:WindowListener.java


示例20: unbindMember

import org.apache.felix.ipojo.annotations.Unbind; //导入依赖的package包/类
@Unbind
public void unbindMember(BalancerMember member) {
    removeMember(member);
}
 
开发者ID:wisdom-framework,项目名称:wisdom,代码行数:5,代码来源:MyBalancer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SiteRendererSink类代码示例发布时间:2022-05-23
下一篇:
Java GraphQuery类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap