|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Context
Provides access to services and information specific to this
component's context. You will never need to extend or implement
this interface.
You will use this interface only through more specific subinterfaces,
such as JwsContext
and
ControlContext
.
Nested Class Summary | |
---|---|
static interface |
Context.Callback
Defines callback events that may be received by the container. |
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. |
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. |
ServiceHandle |
getService()
Returns a ServiceHandle instance for the currently active service instance. |
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. |
Method Detail |
---|
boolean isFinished()
true
if the conversation has finished;
false
if it hasn't.void finishConversation()
@conversation phase="finish"
tag.
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.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.long getMaxAge() throws IllegalStateException
IllegalStateException
- if the method is called from a
service instance that is not conversational.long getCurrentAge() throws IllegalStateException
IllegalStateException
- If the method is called
from a service instance that is not conversational.void resetIdleTime() throws IllegalStateException
IllegalStateException
- if the method is called from a service
instance that is not conversational.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.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.long getMaxIdleTime() throws IllegalStateException
IllegalStateException
- if the method is called from a
service instance that is not conversational.long getCurrentIdleTime() throws IllegalStateException
IllegalStateException
- if the method is called from a
service instance that is not conversational.Principal getCallerPrincipal()
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.ServiceHandle getService()
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.
categoryName
- The name of the category by which log
messages should be grouped.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |