本文整理汇总了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;未经允许,请勿转载。 |
请发表评论