|
BEA Systems, Inc. | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides access to container services that support web services
(JWS files). Represents the execution context of the web service.
Methods in this interface can be used to access out-of-band data for
communication with other web service architectures and to manage
conversations.
For more information on building web services, see
Building Web Services.
Method Summary | |
void |
finishConversation()
Marks the current conversation instance as requiring removal after the currently executing method or event handler returns. |
Principal |
getCallerPrincipal()
Returns the security principal associated with the current method invocation if authentication was performed. |
long |
getCurrentAge()
Returns the conversation's current age (in seconds). |
long |
getCurrentIdleTime()
Gets the number of seconds since the last client request, or since the conversation's maximum idle time was reset. |
Element[] |
getInputHeaders()
Returns the SOAP headers that arrived with the current method invocation message. |
Logger |
getLogger(String name)
Gets an instance of the Logger class, which you can use to send messages from your code to a log file. |
long |
getMaxAge()
Gets the time representing the longest the conversation may remain active before finishing. |
long |
getMaxIdleTime()
Gets the number of seconds that the conversation can remain idle before finishing due to client inactivity. |
Protocol |
getProtocol()
Gets the protocol of the current request. |
ServiceHandle |
getService()
Returns a ServiceHandle instance for the currently active service instance. |
boolean |
getUnderstoodInputHeaders()
Returns the value most recently set by a call to |
boolean |
isCallerInRole(String roleName)
Returns true if the authenticated principal is within the specified security role. |
boolean |
isFinished()
Returns whether or not this conversation instance has had finish() called on it (indicating that code has requested termination of this conversation instance). |
void |
resetIdleTime()
Resets the timer measuring the number of seconds since the last activity for the current conversation. |
void |
setMaxAge(Date date)
Sets a new maximum age for the conversation to an absolute Date. |
void |
setMaxAge(String duration)
Sets a conversation's maximum age by specifying a duration as a string. |
void |
setMaxIdleTime(long seconds)
Sets the number of seconds that the conversation can remain idle before finishing due to client inactivity. |
void |
setMaxIdleTime(String duration)
Sets the number of seconds (as a String) that the conversation can remain idle before finishing due to client inactivity. |
void |
setOutputHeaders(Element[] headers)
Set the SOAP headers to be sent with outgoing messages to the client. |
void |
setUnderstoodInputHeaders(boolean understood)
Indicates whether input headers were understood. |
Method Detail |
public void finishConversation()
@conversation phase="finish"
tag.
public Principal getCallerPrincipal()
public long getCurrentAge() throws IllegalStateException
IllegalStateException
- If the method is called
from a service instance that is not conversational.public long getCurrentIdleTime() throws IllegalStateException
IllegalStateException
- if the method is called from a
service instance that is not conversational.public Element[] getInputHeaders()
public Logger getLogger(String name)
BEA_HOME/weblogic81/samples/workshop/jws.logUse the categoryName parameter to specify category text that will be included with log entries. For example, you might specify the name of the JWS file so that you can more easily find relevant messages when scanning the log file. A log message might appear as follows for an entry in which categoryName is "MyService".
16:18:11 ERROR MyService: My log message.Note: You can customize aspects of the logging configuration, including the name of the application log file, its size limit, and so on. You configure logging using the workshopLogCfg.xml file. For more information, search the WebLogic Workshop documentation for "workshopLogCfg.xml Configuration File".
Logger
class.
name
- The name of the category by which log
messages should be grouped.
public long getMaxAge() throws IllegalStateException
IllegalStateException
- if the method is called from a
service instance that is not conversational.public long getMaxIdleTime() throws IllegalStateException
IllegalStateException
- if the method is called from a
service instance that is not conversational.public Protocol getProtocol()
public ServiceHandle getService()
public boolean getUnderstoodInputHeaders()
false
if
JwsContext.setUnderstoodInputHeaders() has not been called.public boolean isCallerInRole(String roleName)
roleName
- The name of the security role against which
to check the authenticated principal.
true
if the principal is within the specified security
role; false
if they are not.public boolean isFinished()
true
if the conversation has finished;
false
if it hasn't.public void resetIdleTime() throws IllegalStateException
IllegalStateException
- if the method is called from a service
instance that is not conversational.public void setMaxAge(Date date) throws IllegalStateException, IllegalArgumentException
date
- The time after which the conversation should finish; null
to disable the age timeout.
IllegalStateException
- if the method is called from a service
instance that is not conversational.
IllegalArgumentException
- If this method has passed
an illegal or inappropriate argument.public void setMaxAge(String duration) throws IllegalStateException, IllegalArgumentException
duration
- The period after which the conversation will finish.
IllegalStateException
- if the method is called from a
service instance that is not conversational.
IllegalArgumentException
- If this method has passed
an illegal or inappropriate argument.public void setMaxIdleTime(long seconds) throws IllegalStateException, IllegalArgumentException
setMaxIdleTime
or
setMaxIdleTime
method.
resetIdleTime
method is called.
seconds
- The number of seconds the conversation can remain
idle before it will expire.
IllegalStateException
- if the method is called from a
service instance that is not conversational.
IllegalArgumentException
- If this method has passed
an illegal or inappropriate argument.public void setMaxIdleTime(String duration) throws IllegalStateException, IllegalArgumentException
setMaxIdleTime
or
setMaxIdleTime
method.
resetIdleTime
method is called.
duration
- The number of seconds the conversation can remain
idle before it will expire.
IllegalStateException
- if the method is called from a
service instance that is not conversational.
IllegalArgumentException
- If this method has passed
an illegal or inappropriate argument.public void setOutputHeaders(Element[] headers)
headers
- An array of org.w3c.dom.Element objects
containing valid SOAP headers.public void setUnderstoodInputHeaders(boolean understood)
true
,
then a SOAP fault will be generated.
understood
- true
to indicate that "mustUnderstand"
headers were understood; false
to indicate they weren't.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs91 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |