Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008, 2010 VMware Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: VMware Inc. - initial contribution /
package org.eclipse.virgo.nano.shim.scope;
Creates Scope instances for ServiceReferences and for lookups.

Concurrent Semantics
Implementations of this interface must be thread safe.

public interface ScopeFactory {

    
Get the Scope containing the given org.osgi.framework.Bundle.

Parameters:
bundle the Bundle whose scope is required
Returns:
the Scope containing the given bundle
    Scope getBundleScope(Bundle bundle);

    
Get the global Scope.

Returns:
the global Scope
    Scope getGlobalScope();

    
Gets the Scope under which the referenced service is published.

Parameters:
ref service reference
Returns:
the scope
    Scope getServiceScope(ServiceReference ref);

    
Get the Scope for the given application scope name.

Parameters:
applicationScopeName the name of the scope
Returns:
the Scope with the given name
    Scope getApplicationScope(String applicationScopeName);

    
Destroy the given application Scope. Existing Scope instances equivalent to the given Scope will continue to exist and share properties, but calls to get a Scope with the same application scope name as the given Scope will produce a new Scope with a distinct collection of properties. Effectively, this method delimits a 'generation' of an application scope.

Parameters:
applicationScope the application Scope to be destroyed.
    void destroyApplicationScope(Scope applicationScope);
New to GrepCode? Check out our FAQ X