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 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.

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

Get the global Scope.

the global Scope
    Scope getGlobalScope();

Gets the Scope under which the referenced service is published.

ref service reference
the scope
    Scope getServiceScope(ServiceReference ref);

Get the Scope for the given application scope name.

applicationScopeName the name of the scope
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.

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