nl.tudelft.simulation.naming
Class FileContext

java.lang.Object
  extended by nl.tudelft.simulation.event.EventProducer
      extended by nl.tudelft.simulation.naming.JVMContext
          extended by nl.tudelft.simulation.naming.FileContext
All Implemented Interfaces:
Serializable, Context, EventContext, EventProducerInterface

public class FileContext
extends JVMContext
implements Serializable

The FileContext as implementation of the Context interface.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.0
Version:
1.3 2004-03-24
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
 
Fields inherited from class nl.tudelft.simulation.naming.JVMContext
CHILD_ADDED_EVENT, CHILD_REMOVED_EVENT, elements, eventListeners, NUMBER_CHANGED_EVENT, parent, parser
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface javax.naming.event.EventContext
OBJECT_SCOPE, ONELEVEL_SCOPE, SUBTREE_SCOPE
 
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
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
FileContext(File file)
          constructs a new FileContext
FileContext(File file, Context parent, String atomicName)
          constructs a new FileContext
 
Method Summary
 void bind(Name name, Object value)
           
 void bind(String name, Object value)
           
 Object clone()
           
 Context createSubcontext(Name name)
           
 Context createSubcontext(String arg0)
           
 void destroySubcontext(Name arg0)
           
 void destroySubcontext(String arg0)
           
 void rebind(Name name, Object value)
           
 void rebind(String name, Object value)
           
 Object removeFromEnvironment(String arg0)
           
 void rename(Name nameOld, Name nameNew)
           
 void rename(String nameOld, String nameNew)
           
 void unbind(Name name)
           
 void unbind(String name)
           
 
Methods inherited from class nl.tudelft.simulation.naming.JVMContext
addNamingListener, addNamingListener, addToEnvironment, close, composeName, composeName, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, removeNamingListener, targetMustExist, toString
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypes, removeListener
 

Constructor Detail

FileContext

public FileContext(File file)
constructs a new FileContext

Parameters:
file - the file to write to

FileContext

public FileContext(File file,
                   Context parent,
                   String atomicName)
constructs a new FileContext

Parameters:
file - the file to which to write
parent - the parent context
atomicName - the atomicName
Method Detail

bind

public void bind(Name name,
                 Object value)
          throws NamingException
Specified by:
bind in interface Context
Overrides:
bind in class JVMContext
Throws:
NamingException
See Also:
Context.bind(javax.naming.Name, java.lang.Object)

bind

public void bind(String name,
                 Object value)
          throws NamingException
Specified by:
bind in interface Context
Overrides:
bind in class JVMContext
Throws:
NamingException
See Also:
Context.bind(java.lang.String, java.lang.Object)

createSubcontext

public Context createSubcontext(Name name)
                         throws NamingException
Specified by:
createSubcontext in interface Context
Overrides:
createSubcontext in class JVMContext
Throws:
NamingException
See Also:
Context.createSubcontext(javax.naming.Name)

createSubcontext

public Context createSubcontext(String arg0)
                         throws NamingException
Specified by:
createSubcontext in interface Context
Overrides:
createSubcontext in class JVMContext
Throws:
NamingException
See Also:
Context.createSubcontext(java.lang.String)

destroySubcontext

public void destroySubcontext(Name arg0)
                       throws NamingException
Specified by:
destroySubcontext in interface Context
Overrides:
destroySubcontext in class JVMContext
Throws:
NamingException
See Also:
Context.destroySubcontext(javax.naming.Name)

destroySubcontext

public void destroySubcontext(String arg0)
                       throws NamingException
Specified by:
destroySubcontext in interface Context
Overrides:
destroySubcontext in class JVMContext
Throws:
NamingException
See Also:
Context.destroySubcontext(java.lang.String)

rebind

public void rebind(Name name,
                   Object value)
            throws NamingException
Specified by:
rebind in interface Context
Overrides:
rebind in class JVMContext
Throws:
NamingException
See Also:
Context.rebind(javax.naming.Name, java.lang.Object)

rebind

public void rebind(String name,
                   Object value)
            throws NamingException
Specified by:
rebind in interface Context
Overrides:
rebind in class JVMContext
Throws:
NamingException
See Also:
Context.rebind(java.lang.String, java.lang.Object)

removeFromEnvironment

public Object removeFromEnvironment(String arg0)
                             throws NamingException
Specified by:
removeFromEnvironment in interface Context
Overrides:
removeFromEnvironment in class JVMContext
Throws:
NamingException
See Also:
Context.removeFromEnvironment(java.lang.String)

rename

public void rename(Name nameOld,
                   Name nameNew)
            throws NamingException
Specified by:
rename in interface Context
Overrides:
rename in class JVMContext
Throws:
NamingException
See Also:
Context.rename(javax.naming.Name, javax.naming.Name)

rename

public void rename(String nameOld,
                   String nameNew)
            throws NamingException
Specified by:
rename in interface Context
Overrides:
rename in class JVMContext
Throws:
NamingException
See Also:
Context.rename(java.lang.String, java.lang.String)

unbind

public void unbind(Name name)
            throws NamingException
Specified by:
unbind in interface Context
Overrides:
unbind in class JVMContext
Throws:
NamingException
See Also:
Context.unbind(javax.naming.Name)

unbind

public void unbind(String name)
            throws NamingException
Specified by:
unbind in interface Context
Overrides:
unbind in class JVMContext
Throws:
NamingException
See Also:
Context.unbind(java.lang.String)

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class JVMContext
Throws:
CloneNotSupportedException
See Also:
Object.clone()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.