|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable
wt.method.MethodContext
public final class MethodContext
Context corresponding to an active method invocation in the method server. This class maintains an association between threads and resources currently assigned to the threads such as a database connections.
This class extends java.util.Hashtable so it can be used to maintain thread
local storage that pertains to a particular method invocation. Methods are free to store
whatever values they need under unique keys with confidence that the references will be
freed when this context is unregistered.
For RMI calls, it is created immediately before argument unmarshaling begins and is
unregisted after the reply has been marshaled back to the client. For non-RMI contexts
(CORBA or internal), the context must be explicitly constructed and unregistered.
Supported API: true
Extendable: false
| Nested Class Summary | |
|---|---|
static interface |
wt.method.MethodContext.Listener
|
| Constructor Summary | |
|---|---|
MethodContext(String client_host,
Object authentication)
Public constructor for use by non-RMI threads Associates the current thread with a new context. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
Object[] |
getArgObjects()
Get the argument array for the method invoked by this context. |
Class[] |
getArgTypes()
Get the argument class array for the method invoked by this context. |
Object |
getAuthentication()
Get the authentication object associated with this context. |
String |
getClientHost()
Get the client host name for this context. |
static MethodContext |
getContext()
Get the current thread's method context. |
String |
getTargetClassName()
Get the name of the target class invoked by this context. |
String |
getTargetMethodName()
Get the name of the target method invoked by this context. |
Object |
getTargetObject()
Get the target object of the method invoked by this context. |
Object |
put(Object key,
Object value)
Override Hashtable.put to add property change support. |
Object |
remove(Object key)
Override Hashtable.remove to add property change support. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
boolean |
sendFeedback(MethodFeedback feedback)
Send feedback objects to RMI client while call is being processed A return value of false indicates that the client has disconnected. |
void |
setAuthentication(Object auth)
Set the authentication object associated with this context. |
void |
setThread(Thread thread)
Set the thread associated with this context. |
void |
unregister()
Unregister this method context. |
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MethodContext(String client_host,
Object authentication)
client_host - calling client hostname - may be needed to validate authenticationauthentication - opaque authentication objectAuthenticator| Method Detail |
|---|
public void unregister()
public void setThread(Thread thread)
thread - the thread for this contextpublic static MethodContext getContext()
public String getTargetMethodName()
public String getTargetClassName()
public Object getTargetObject()
public Object[] getArgObjects()
public Class[] getArgTypes()
public String getClientHost()
public Object getAuthentication()
public void setAuthentication(Object auth)
public boolean sendFeedback(MethodFeedback feedback)
feedback - the feedback object
public void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener to the listener list.
Property change events will be fired to all registered listeners whenever a
value in this hashtable is added, changed, or removed.
listener - the PropertyChangeListener to be addedpublic void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the listener list.
listener - the PropertyChangeListener to be removed
public Object put(Object key,
Object value)
Hashtable.put to add property change support.
put in interface Mapput in class Hashtablekey - the hashtable keyvalue - the value
Hashtablepublic Object remove(Object key)
Hashtable.remove to add property change support.
remove in interface Mapremove in class Hashtablekey - the key that needs to be removed
Hashtable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||