oracle.soap.server
Class ContainerContext
java.lang.Object
|
+--oracle.soap.server.ContainerContext
- public class ContainerContext
- extends java.lang.Object
ContainerContext
defines the context of the container
in which the SOAP server is running.
The actual content depends on the environment in which the server is
running, such as in a servlet engine. This class should contain
only container-specific content.
Type | Field |
static java.lang.String |
SERVLET_CONTAINER
The value for a servlet container type. |
Type | Method |
java.lang.Object |
getAttribute(java.lang.String name)
Returns the attribute with the given name, or null if there
is no attribute by that name. |
java.util.Enumeration |
getAttributeNames()
Returns an Enumeration containing the attribute names available
within this SOAP context. |
java.lang.String |
getContainerType()
Returns the container type. |
javax.servlet.http.HttpServlet |
getHttpServlet()
Returns the HTTP servlet if the container type is SERVLET_CONTAINER. |
void |
removeAttribute(java.lang.String name)
Removes the attribute with the given name from the context. |
void |
setAttribute(java.lang.String name,
java.lang.Object object)
Binds an object to a given attribute name in this SOAP context. |
void |
setContainerType(java.lang.String containerType)
Set the container type. |
void |
setHttpServlet(javax.servlet.http.HttpServlet servlet)
Set the HTTP servlet for a SOAP server running in a SERVLET_CONTAINER
type of container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVLET_CONTAINER
public static final java.lang.String SERVLET_CONTAINER
- The value for a servlet container type.
ContainerContext
public ContainerContext()
setContainerType
public void setContainerType(java.lang.String containerType)
- Set the container type.
- Parameters:
containerType
- The type of container in which the SOAP server is running.
getContainerType
public java.lang.String getContainerType()
- Returns the container type.
- Returns:
- The type of container in which the SOAP server is running.
getHttpServlet
public javax.servlet.http.HttpServlet getHttpServlet()
- Returns the HTTP servlet if the container type is SERVLET_CONTAINER.
- Returns:
- The
HttpServlet
that is processing the SOAP request, or
null
if the servlet attribute is not set.
setHttpServlet
public void setHttpServlet(javax.servlet.http.HttpServlet servlet)
- Set the HTTP servlet for a SOAP server running in a SERVLET_CONTAINER
type of container.
- Parameters:
servlet
- The HttpServlet
that is processing the SOAP request.
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
- Returns the attribute with the given name, or null if there
is no attribute by that name.
- Parameters:
name
- A String
specifying the name of the attribute.- Returns:
- An Object containing the value of the attribute, or
null
if no attribute exists matching the given name. - See Also:
getAttributeNames()
getAttributeNames
public java.util.Enumeration getAttributeNames()
- Returns an Enumeration containing the attribute names available
within this SOAP context.
- Returns:
- An
Enumeration
of attribute names. - See Also:
getAttribute(java.lang.String)
setAttribute
public void setAttribute(java.lang.String name,
java.lang.Object object)
- Binds an object to a given attribute name in this SOAP context.
If the name specified is already used for an attribute, this method
will remove the old attribute and bind the name to the new attribute.
Neither the name nor the object may be null.
- Parameters:
name
- A non-null String
specifying the name of the attribute.object
- An non-null Object
representing the attribute to be bound.
removeAttribute
public void removeAttribute(java.lang.String name)
- Removes the attribute with the given name from the context.
After removal, subsequent calls to getAttribute(java.lang.String)
to retrieve the attribute's value will return null.
- Parameters:
name
- A String
specifying the name of the attribute to be
removed.object
- An Object
representing the attribute to be bound.
Copyright © 2001 Oracle SOAP. All Rights Reserved.