Package ch.tocco.nice2.netui.impl.remote
Class NullRemoteContext
java.lang.Object
ch.tocco.nice2.netui.impl.remote.NullRemoteContext
- All Implemented Interfaces:
RemoteContext
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.netui.api.remote.RemoteContext
RemoteContext.Current
-
Constructor 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.
-
Constructor Details
-
NullRemoteContext
public NullRemoteContext()
-
-
Method Details
-
getHttpSessionId
- Specified by:
getHttpSessionId
in interfaceRemoteContext
-
getUserName
- Specified by:
getUserName
in interfaceRemoteContext
-
getScriptSessionId
- Specified by:
getScriptSessionId
in interfaceRemoteContext
-
currentThreadIsWebThread
public boolean currentThreadIsWebThread()- Specified by:
currentThreadIsWebThread
in interfaceRemoteContext
-
withCurrentBrowser
Description copied from interface:RemoteContext
Call action only in current browser (not in all sessions of the current user).Note: This method is not available in Non-Web threads.
- Specified by:
withCurrentBrowser
in interfaceRemoteContext
- Parameters:
actionName
- The action in the client to call.params
- Params to pass to the action.
-
withCurrentUser
Description copied from interface:RemoteContext
Call action in all sessions of the current user.Note: This method is not available if the user name is null.
- Specified by:
withCurrentUser
in interfaceRemoteContext
- Parameters:
actionName
- The action in the client to call.params
- Params to pass to the action.
-
withUser
Description copied from interface:RemoteContext
Call action in all sessions of the given user.- Specified by:
withUser
in interfaceRemoteContext
- Parameters:
userName
- The user to call.actionName
- The action in the client to call.params
- Params to pass to the action.
-
withScriptSession
public void withScriptSession(String scriptSessionId, String actionName, @Nullable @Nullable Object... params) Description copied from interface:RemoteContext
Call action in script session with the given id.- Specified by:
withScriptSession
in interfaceRemoteContext
- 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
Description copied from interface:RemoteContext
Call action in all sessions.- Specified by:
withAll
in interfaceRemoteContext
- Parameters:
actionName
- The action in the client to call.params
- Params to pass to the action.
-