Class NullRemoteContext

java.lang.Object
ch.tocco.nice2.netui.impl.remote.NullRemoteContext
All Implemented Interfaces:
RemoteContext

public class NullRemoteContext extends Object implements RemoteContext
  • Constructor Details

    • NullRemoteContext

      public NullRemoteContext()
  • Method Details

    • getHttpSessionId

      @Nullable public @Nullable String getHttpSessionId()
      Specified by:
      getHttpSessionId in interface RemoteContext
    • getUserName

      @Nullable public @Nullable String getUserName()
      Specified by:
      getUserName in interface RemoteContext
    • getScriptSessionId

      @Nullable public @Nullable String getScriptSessionId()
      Specified by:
      getScriptSessionId in interface RemoteContext
    • currentThreadIsWebThread

      public boolean currentThreadIsWebThread()
      Specified by:
      currentThreadIsWebThread in interface RemoteContext
    • withCurrentBrowser

      public void withCurrentBrowser(String actionName, @Nullable @Nullable Object... params)
      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 interface RemoteContext
      Parameters:
      actionName - The action in the client to call.
      params - Params to pass to the action.
    • withCurrentUser

      public void withCurrentUser(String actionName, @Nullable @Nullable Object... params)
      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 interface RemoteContext
      Parameters:
      actionName - The action in the client to call.
      params - Params to pass to the action.
    • withUser

      public void withUser(String userName, String actionName, @Nullable @Nullable Object... params)
      Description copied from interface: RemoteContext
      Call action in all sessions of the given user.
      Specified by:
      withUser in interface RemoteContext
      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 interface RemoteContext
      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

      public void withAll(String actionName, @Nullable @Nullable Object... params)
      Description copied from interface: RemoteContext
      Call action in all sessions.
      Specified by:
      withAll in interface RemoteContext
      Parameters:
      actionName - The action in the client to call.
      params - Params to pass to the action.