Package ch.tocco.nice2.netui.api.remote
Interface RemoteContext
- All Known Implementing Classes:
NullRemoteContext
,RemoteContextImpl
public interface RemoteContext
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
@Nullable String
@Nullable String
@Nullable String
void
Call action in all sessions.void
withCurrentBrowser
(String actionName, @Nullable Object... params) Call action only in current browser (not in all sessions of the current user).void
withCurrentUser
(String actionName, @Nullable Object... params) Call action in all sessions of the current user.void
withScriptSession
(String scriptSessionId, String actionName, @Nullable Object... params) Call action in script session with the given id.void
Call action in all sessions of the given user.
-
Method Details
-
getHttpSessionId
-
getUserName
-
getScriptSessionId
-
currentThreadIsWebThread
boolean currentThreadIsWebThread() -
withCurrentBrowser
Call action only in current browser (not in all sessions of the current user).Note: This method is not available in Non-Web threads.
- Parameters:
actionName
- The action in the client to call.params
- Params to pass to the action.
-
withCurrentUser
Call action in all sessions of the current user.Note: This method is not available if the user name is null.
- Parameters:
actionName
- The action in the client to call.params
- Params to pass to the action.
-
withUser
Call action in all sessions of the given user.- Parameters:
userName
- The user to call.actionName
- The action in the client to call.params
- Params to pass to the action.
-
withScriptSession
void withScriptSession(String scriptSessionId, String actionName, @Nullable @Nullable Object... params) Call action in script session with the given id.- Parameters:
scriptSessionId
- The id of the script session to call.actionName
- The action in the client to call.params
- Params to pass to the action.
-
withAll
Call action in all sessions.- Parameters:
actionName
- The action in the client to call.params
- Params to pass to the action.
-