|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ControlContext
The ControlContext interface defines the container services and events
that controls can use at run time. For example, through methods of this
interface, a Java control can access its own property attribute
values, handle lifecycle events, send callbacks, and so
on.
Note: The ControlContext interface is provided as part of the WebLogic Workshop Control
Development Kit. The Control Development Kit is for users who are
creating advanced controls. It is available in your BEA installation
in the following directory:
BEA_HOME\weblogic81\samples\workshop\ControlDevKit\
Context
Nested Class Summary | |
---|---|
static interface |
ControlContext.Callback
Provides a way for controls to receive callbacks from their environment. |
Method Summary | |
---|---|
void |
addCallbackListener(ControlContext.Callback listener)
Registers a new Callback listener for events on this context |
void |
cancelEvents(String eventName)
Cancels callback events that have the specified event name. |
Class |
getCallbackInterface()
Returns the java.lang.Class object for this component's callback interface. |
String |
getControlAttribute(String tagName,
String attrName)
Returns the value for the specified control tag attribute. |
List |
getControlAttributes(String tagName)
Returns a list of the attributes and values for the specified property tag annotating a control instance. |
Class |
getControlInterface()
Returns the java.lang.Class object for the component call interface. |
Object |
getMethodArgument(String argName)
Returns the value for the specified method argument. |
String[] |
getMethodArgumentNames()
Returns the argument names associated with the current invocation context. |
String |
getMethodAttribute(String tagName,
String attrName)
Returns the value for the specified method tag attribute. |
List |
getMethodAttributes(String tagName)
Returns a list of the attributes and values for the specified property tag annotating a control method. |
Object |
raiseEvent()
Forwards to this control's client a callback that the control has received. |
void |
removeCallbackListener(ControlContext.Callback listener)
Deregisters an existing Callback listener for events on this context. |
void |
scheduleEvent(String eventName,
Object[] eventArgs,
long time,
boolean ignoreIfFinished)
Schedules a callback to occur on this control instance at a specified time. |
Object |
sendEvent(String eventName,
Object[] args)
Sends a callback event that is declared as part of this control's callback interface. |
Methods inherited from interface weblogic.jws.control.Context |
---|
finishConversation, getCallerPrincipal, getCurrentAge, getCurrentIdleTime, getLogger, getMaxAge, getMaxIdleTime, getService, isCallerInRole, isFinished, resetIdleTime, setMaxAge, setMaxAge, setMaxIdleTime, setMaxIdleTime |
Method Detail |
---|
Class getControlInterface()
Class getCallbackInterface()
String getMethodAttribute(String tagName, String attrName)
tagName
- The name of the property tag that exposes
attrName.attrName
- The name of the attribute whose value should
be retrieved.
List getMethodAttributes(String tagName)
List
of
Map
objects.
Each entry in the list maps an attribute name to the attribute's
current value (as a String) for a single occurrence of the tag.
tagName
- The tag whose attributes should be returned.
String getControlAttribute(String tagName, String attrName)
tagName
- The tag whose attribute should be returned.attrName
- The attribute whose value should be returned.
List getControlAttributes(String tagName)
List
of
Map
objects.
Each entry in the list maps an attribute name to the attribute's
current value (as a String) for a single occurrence of the tag.
tagName
- The tag whose attributes should be returned.
Object getMethodArgument(String argName) throws IllegalArgumentException
getMethodArgumentNames
method to retrieve a list of arguments for the current method.
argName
- The name of the method argument to
return.
IllegalArgumentException
- If there is no
argument whose name matches argName.String[] getMethodArgumentNames()
Object sendEvent(String eventName, Object[] args) throws Exception
eventName
- The callback event to send.args
- An array of values to be used for the callback's
arguments.
Exception
Object raiseEvent() throws Exception
Exception
void scheduleEvent(String eventName, Object[] eventArgs, long time, boolean ignoreIfFinished) throws SchedulerException
eventName
- The name of the callback event to schedule.eventArgs
- An array of values to use as callback arguments.time
- The time at which the callback event should occur. The
event is guaranteed to happen on or after this time.ignoreIfFinished
- true
if no exception should be
thrown if the callback is sent to a finished instance; false
if an exception should be thrown.
SchedulerException
void cancelEvents(String eventName) throws SchedulerException
eventName
- The name of the callbacks to cancel.
SchedulerException
void addCallbackListener(ControlContext.Callback listener) throws TooManyListenersException
listener
- The listener to receive context events
TooManyListenersException
- A listener has already been registered.void removeCallbackListener(ControlContext.Callback listener)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |