org.apache.aries.jndi.url
Class BlueprintURLContext

java.lang.Object
  extended by org.apache.aries.jndi.url.BlueprintURLContext
All Implemented Interfaces:
Context

public class BlueprintURLContext
extends Object
implements Context


Field Summary
 
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
 
Constructor Summary
BlueprintURLContext(org.osgi.framework.Bundle callersBundle, Hashtable<?,?> env)
           
 
Method Summary
 Object addToEnvironment(String propName, Object propVal)
           
 void bind(Name n, Object o)
           
 void bind(String s, Object o)
           
 void close()
           
 Name composeName(Name name, Name prefix)
           
 String composeName(String name, String prefix)
           
 Context createSubcontext(Name n)
           
 Context createSubcontext(String s)
           
 void destroySubcontext(Name n)
           
 void destroySubcontext(String s)
           
protected  void finalize()
           
 Hashtable<?,?> getEnvironment()
           
static int getGracePeriod(org.osgi.framework.Bundle b)
          Determine the blueprint.timeout set for a given bundle
 String getNameInNamespace()
           
 NameParser getNameParser(Name n)
           
 NameParser getNameParser(String s)
           
 NamingEnumeration<NameClassPair> list(Name name)
           
 NamingEnumeration<NameClassPair> list(String s)
           
 NamingEnumeration<Binding> listBindings(Name name)
           
 NamingEnumeration<Binding> listBindings(String name)
           
 Object lookup(Name name)
           
 Object lookup(String name)
           
 Object lookupLink(Name n)
           
 Object lookupLink(String s)
           
 void rebind(Name n, Object o)
           
 void rebind(String s, Object o)
           
 Object removeFromEnvironment(String propName)
           
 void rename(Name nOld, Name nNew)
           
 void rename(String sOld, String sNew)
           
 void unbind(Name n)
           
 void unbind(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlueprintURLContext

public BlueprintURLContext(org.osgi.framework.Bundle callersBundle,
                           Hashtable<?,?> env)
Method Detail

finalize

protected void finalize()
                 throws NamingException
Overrides:
finalize in class Object
Throws:
NamingException

addToEnvironment

public Object addToEnvironment(String propName,
                               Object propVal)
                        throws NamingException
Specified by:
addToEnvironment in interface Context
Throws:
NamingException

bind

public void bind(Name n,
                 Object o)
          throws NamingException
Specified by:
bind in interface Context
Throws:
NamingException

bind

public void bind(String s,
                 Object o)
          throws NamingException
Specified by:
bind in interface Context
Throws:
NamingException

close

public void close()
           throws NamingException
Specified by:
close in interface Context
Throws:
NamingException

composeName

public Name composeName(Name name,
                        Name prefix)
                 throws NamingException
Specified by:
composeName in interface Context
Throws:
NamingException

composeName

public String composeName(String name,
                          String prefix)
                   throws NamingException
Specified by:
composeName in interface Context
Throws:
NamingException

createSubcontext

public Context createSubcontext(Name n)
                         throws NamingException
Specified by:
createSubcontext in interface Context
Throws:
NamingException

createSubcontext

public Context createSubcontext(String s)
                         throws NamingException
Specified by:
createSubcontext in interface Context
Throws:
NamingException

destroySubcontext

public void destroySubcontext(Name n)
                       throws NamingException
Specified by:
destroySubcontext in interface Context
Throws:
NamingException

destroySubcontext

public void destroySubcontext(String s)
                       throws NamingException
Specified by:
destroySubcontext in interface Context
Throws:
NamingException

getEnvironment

public Hashtable<?,?> getEnvironment()
                              throws NamingException
Specified by:
getEnvironment in interface Context
Throws:
NamingException

getNameInNamespace

public String getNameInNamespace()
                          throws NamingException
Specified by:
getNameInNamespace in interface Context
Throws:
NamingException

getNameParser

public NameParser getNameParser(Name n)
                         throws NamingException
Specified by:
getNameParser in interface Context
Throws:
NamingException

getNameParser

public NameParser getNameParser(String s)
                         throws NamingException
Specified by:
getNameParser in interface Context
Throws:
NamingException

list

public NamingEnumeration<NameClassPair> list(Name name)
                                      throws NamingException
Specified by:
list in interface Context
Throws:
NamingException

list

public NamingEnumeration<NameClassPair> list(String s)
                                      throws NamingException
Specified by:
list in interface Context
Throws:
NamingException

listBindings

public NamingEnumeration<Binding> listBindings(Name name)
                                        throws NamingException
Specified by:
listBindings in interface Context
Throws:
NamingException

listBindings

public NamingEnumeration<Binding> listBindings(String name)
                                        throws NamingException
Specified by:
listBindings in interface Context
Throws:
NamingException

lookup

public Object lookup(Name name)
              throws NamingException,
                     ServiceUnavailableException
Specified by:
lookup in interface Context
Throws:
NamingException
ServiceUnavailableException

lookup

public Object lookup(String name)
              throws NamingException
Specified by:
lookup in interface Context
Throws:
NamingException

lookupLink

public Object lookupLink(Name n)
                  throws NamingException
Specified by:
lookupLink in interface Context
Throws:
NamingException

lookupLink

public Object lookupLink(String s)
                  throws NamingException
Specified by:
lookupLink in interface Context
Throws:
NamingException

rebind

public void rebind(Name n,
                   Object o)
            throws NamingException
Specified by:
rebind in interface Context
Throws:
NamingException

rebind

public void rebind(String s,
                   Object o)
            throws NamingException
Specified by:
rebind in interface Context
Throws:
NamingException

removeFromEnvironment

public Object removeFromEnvironment(String propName)
                             throws NamingException
Specified by:
removeFromEnvironment in interface Context
Throws:
NamingException

rename

public void rename(Name nOld,
                   Name nNew)
            throws NamingException
Specified by:
rename in interface Context
Throws:
NamingException

rename

public void rename(String sOld,
                   String sNew)
            throws NamingException
Specified by:
rename in interface Context
Throws:
NamingException

unbind

public void unbind(Name n)
            throws NamingException
Specified by:
unbind in interface Context
Throws:
NamingException

unbind

public void unbind(String s)
            throws NamingException
Specified by:
unbind in interface Context
Throws:
NamingException

getGracePeriod

public static int getGracePeriod(org.osgi.framework.Bundle b)
Determine the blueprint.timeout set for a given bundle

Parameters:
b - The bundle to inspect
Returns:
-1 if blueprint.graceperiod is false, otherwise the value of blueprint.timeout, or 300000 if blueprint.graceperiod is true and no value is given for blueprint.timeout.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.