org.davesag.generica.servlet.util
Class PipeImpl

java.lang.Object
  extended byorg.davesag.generica.servlet.util.PipeImpl
All Implemented Interfaces:
Pipe

public class PipeImpl
extends Object
implements Pipe

Default implementation of the Pipe interface. Uses a standard HashMap to store attributes.

Since:
Generica 1.0
Version:
CVS Revision $Id: PipeImpl.java,v 1.5 2004/03/30 13:00:42 davesag Exp $
Author:
Dave Sag http://www.davesag.com

Nested Class Summary
 
Nested classes inherited from class org.davesag.generica.servlet.util.Pipe
Pipe.Factory
 
Field Summary
protected  Map theAttributes
          the map of attributes
protected  String theName
          the name
protected  HttpSession theSession
          the session
 
Constructor Summary
PipeImpl()
          Creates a new PipeImpl object.
 
Method Summary
 void close()
          closes the pipe and removes all of it's attributes.
 Object getAttribute(String name)
          get the named attribute
 Iterator getAttributeNames()
          get an iterator of all the attribute names.
 void removeAttribute(String name)
          remove the attribute
 void setAttribute(String name, Object value)
          set the attribute
 void setName(String name)
          set the pipe name.
 void setSession(HttpSession session)
          set the http session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theName

protected String theName
the name


theSession

protected HttpSession theSession
the session


theAttributes

protected Map theAttributes
the map of attributes

Constructor Detail

PipeImpl

public PipeImpl()
Creates a new PipeImpl object.

Method Detail

setName

public void setName(String name)
set the pipe name.

Specified by:
setName in interface Pipe
Parameters:
name - pipe name.

setSession

public void setSession(HttpSession session)
set the http session.

Specified by:
setSession in interface Pipe
Parameters:
session - the http session.

getAttribute

public Object getAttribute(String name)
get the named attribute

Specified by:
getAttribute in interface Pipe
Parameters:
name - the name of the attribute.
Returns:
the object in the pipe with the name.

getAttributeNames

public Iterator getAttributeNames()
get an iterator of all the attribute names.

Specified by:
getAttributeNames in interface Pipe
Returns:
an iterator of all the attribute names.

setAttribute

public void setAttribute(String name,
                         Object value)
set the attribute

Specified by:
setAttribute in interface Pipe
Parameters:
name - the name
value - the object to store.

removeAttribute

public void removeAttribute(String name)
remove the attribute

Specified by:
removeAttribute in interface Pipe
Parameters:
name - the name of the attribute to remove.

close

public void close()
closes the pipe and removes all of it's attributes.

Specified by:
close in interface Pipe


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.