Package jadex.bridge
Class ServiceCall
- java.lang.Object
- 
- jadex.bridge.ServiceCall
 
- 
- Direct Known Subclasses:
- CallAccess
 
 public class ServiceCall extends java.lang.ObjectInformation about a current service call. Similar to a ThreadLocal in Java but for service calls, i.e. between different threads and hosts available.
- 
- 
Field SummaryFields Modifier and Type Field Description IComponentIdentifiercallerThe calling component.protected static java.lang.ThreadLocal<ServiceCall>CURRENTThe current service calls mapped to threads.static java.lang.StringDEFTIMEOUTstatic java.lang.StringINHERITThe inherit constant.protected static java.lang.ThreadLocal<ServiceCall>LASTThe upcoming service invocations.IComponentIdentifierlastmodstatic java.lang.StringMONITORINGThe monitoring constant.protected static java.lang.ThreadLocal<ServiceCall>NEXTThe upcoming service invocations.java.util.Map<java.lang.String,java.lang.Object>propertiesThe service call properties.static java.lang.StringREALTIMEThe realtime constant.static java.lang.StringSECURITY_INFOSThe security infos constant.static java.lang.StringTIMEOUTThe timeout constant.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedServiceCall(IComponentIdentifier caller, java.util.Map<java.lang.String,java.lang.Object> props)Create a service call info object.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static ServiceCallcreateServiceCall(IComponentIdentifier caller, java.util.Map<java.lang.String,java.lang.Object> props)Create a service call.IComponentIdentifiergetCaller()Get the caller component.static ServiceCallgetCurrentInvocation()Get the service call instance corresponding to the current execution context.static ServiceCallgetLastInvocation()Get the last service call instance corresponding to the current execution context.static ServiceCallgetNextInvocation()Get the invocation data for the next service call.static ServiceCallgetOrCreateNextInvocation()Set the properties of the next invocation.static ServiceCallgetOrCreateNextInvocation(java.util.Map<java.lang.String,java.lang.Object> props)Get or create the next servicecall for the next invocation.java.util.Map<java.lang.String,java.lang.Object>getProperties()Get a property.java.lang.ObjectgetProperty(java.lang.String name)Get a property.longgetTimeout()Get the timeout value.booleanhasUserTimeout()Test if the user has set a timeout.booleanisRemoteCall(IComponentIdentifier callee)Test if a call is remote.voidremoveProperty(java.lang.String name)Remove a property.voidsetProperty(java.lang.String name, java.lang.Object val)Set a property.voidsetTimeout(long to)Set the timeout.java.lang.StringtoString()Get the string represntation.
 
- 
- 
- 
Field Detail- 
TIMEOUTpublic static final java.lang.String TIMEOUT The timeout constant.- See Also:
- Constant Field Values
 
 - 
DEFTIMEOUTpublic static final java.lang.String DEFTIMEOUT - See Also:
- Constant Field Values
 
 - 
REALTIMEpublic static final java.lang.String REALTIME The realtime constant.- See Also:
- Constant Field Values
 
 - 
MONITORINGpublic static final java.lang.String MONITORING The monitoring constant.- See Also:
- Constant Field Values
 
 - 
INHERITpublic static final java.lang.String INHERIT The inherit constant.- See Also:
- Constant Field Values
 
 - 
SECURITY_INFOSpublic static final java.lang.String SECURITY_INFOS The security infos constant.- See Also:
- Constant Field Values
 
 - 
CURRENTprotected static final java.lang.ThreadLocal<ServiceCall> CURRENT The current service calls mapped to threads.
 - 
NEXTprotected static final java.lang.ThreadLocal<ServiceCall> NEXT The upcoming service invocations.
 - 
LASTprotected static final java.lang.ThreadLocal<ServiceCall> LAST The upcoming service invocations.
 - 
callerpublic IComponentIdentifier caller The calling component.
 - 
propertiespublic java.util.Map<java.lang.String,java.lang.Object> properties The service call properties.
 - 
lastmodpublic IComponentIdentifier lastmod 
 
- 
 - 
Constructor Detail- 
ServiceCallprotected ServiceCall(IComponentIdentifier caller, java.util.Map<java.lang.String,java.lang.Object> props) Create a service call info object.
 
- 
 - 
Method Detail- 
createServiceCallprotected static ServiceCall createServiceCall(IComponentIdentifier caller, java.util.Map<java.lang.String,java.lang.Object> props) Create a service call.
 - 
getNextInvocationpublic static ServiceCall getNextInvocation() Get the invocation data for the next service call.
 - 
getCurrentInvocationpublic static ServiceCall getCurrentInvocation() Get the service call instance corresponding to the current execution context.- Returns:
- The service call instance or null.
 
 - 
getLastInvocationpublic static ServiceCall getLastInvocation() Get the last service call instance corresponding to the current execution context.- Returns:
- The service call instance or null.
 
 - 
getOrCreateNextInvocationpublic static ServiceCall getOrCreateNextInvocation() Set the properties of the next invocation.- Parameters:
- timeout- The timeout.
- realtime- The realtime flag.
 
 - 
getOrCreateNextInvocationpublic static ServiceCall getOrCreateNextInvocation(java.util.Map<java.lang.String,java.lang.Object> props) Get or create the next servicecall for the next invocation.- Parameters:
- timeout- The timeout.
- realtime- The realtime flag.
 
 - 
getCallerpublic IComponentIdentifier getCaller() Get the caller component.- Returns:
- The caller component.
 
 - 
getTimeoutpublic long getTimeout() Get the timeout value.- Returns:
- The timeout value or -1.
 
 - 
hasUserTimeoutpublic boolean hasUserTimeout() Test if the user has set a timeout.- Returns:
- True, if the user has set a timeout.
 
 - 
setTimeoutpublic void setTimeout(long to) Set the timeout.- Parameters:
- to- The timeout.
 
 - 
isRemoteCallpublic boolean isRemoteCall(IComponentIdentifier callee) Test if a call is remote.
 - 
getPropertypublic java.lang.Object getProperty(java.lang.String name) Get a property.- Parameters:
- name- The property name.
- Returns:
- The property.
 
 - 
setPropertypublic void setProperty(java.lang.String name, java.lang.Object val)Set a property.- Parameters:
- name- The property name.
- val- The property value.
 
 - 
removePropertypublic void removeProperty(java.lang.String name) Remove a property.- Parameters:
- name- The property name.
 
 - 
getPropertiespublic java.util.Map<java.lang.String,java.lang.Object> getProperties() Get a property.- Parameters:
- name- The property name.
- Returns:
- The property.
 
 - 
toStringpublic java.lang.String toString() Get the string represntation.- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-