Tabnine Logo
RpcContext.set
Code IndexAdd Tabnine to your IDE (free)

How to use
set
method
in
org.jboss.errai.bus.server.api.RpcContext

Best Java code snippets using org.jboss.errai.bus.server.api.RpcContext.set (Showing top 8 results out of 315)

origin: org.jboss.errai/errai-bus

RpcContext.set(message);
return method.invoke(serviceProvider.get(message), (parms != null) ? parms.toArray(new Object[parms.size()]) : new Object[0]);
origin: errai/errai

RpcContext.set(message);
return method.invoke(serviceProvider.get(message), (parms != null) ? parms.toArray(new Object[parms.size()]) : new Object[0]);
origin: org.uberfire/uberfire-server

@Before
public void setup() {
  when(authService.getUser()).thenThrow(new AssertionError("Should not call authentication service"));
  when(threadMessage.getResource(QueueSession.class,
                  "Session")).thenReturn(threadQueueSession);
  when(threadQueueSession.getSessionId()).thenReturn(sessionUser.getIdentifier());
  RpcContext.set(null);
}
origin: kiegroup/appformer

@Before
public void setup() {
  when(authService.getUser()).thenThrow(new AssertionError("Should not call authentication service"));
  when(threadMessage.getResource(QueueSession.class,
                  "Session")).thenReturn(threadQueueSession);
  when(threadQueueSession.getSessionId()).thenReturn(sessionUser.getIdentifier());
  RpcContext.set(null);
}
origin: kiegroup/appformer

@Test
public void returnAuthenticatedUserInSessionThread() {
  when(userInstance.isAmbiguous()).thenReturn(false);
  when(userInstance.isUnsatisfied()).thenReturn(false);
  when(userInstance.get()).thenReturn(defaultUser);
  reset(authService);
  when(authService.getUser()).thenReturn(sessionUser);
  RpcContext.set(threadMessage);
  SessionInfo sessionInfo = factory.getSessionInfo(authService);
  assertSame(sessionUser,
        sessionInfo.getIdentity());
}
origin: org.uberfire/uberfire-server

@Test
public void returnAuthenticatedUserInSessionThread() {
  when(userInstance.isAmbiguous()).thenReturn(false);
  when(userInstance.isUnsatisfied()).thenReturn(false);
  when(userInstance.get()).thenReturn(defaultUser);
  reset(authService);
  when(authService.getUser()).thenReturn(sessionUser);
  RpcContext.set(threadMessage);
  SessionInfo sessionInfo = factory.getSessionInfo(authService);
  assertSame(sessionUser,
        sessionInfo.getIdentity());
}
origin: org.uberfire/uberfire-backend-server

  private void setupRpcContext() {
    final Message message = MessageBuilder.createMessage("for testing").signalling().done().getMessage();
    message.setResource("Session",
              queueSession);
    RpcContext.set(message);
  }
}
origin: kiegroup/appformer

  private void setupRpcContext() {
    final Message message = MessageBuilder.createMessage("for testing").signalling().done().getMessage();
    message.setResource("Session",
              queueSession);
    RpcContext.set(message);
  }
}
org.jboss.errai.bus.server.apiRpcContextset

Javadoc

Reads resources from the provided Message and stores them in ThreadLocals.

Popular methods of RpcContext

  • getServletRequest
  • getHttpSession
  • getMessage
  • getQueueSession
  • remove
    Removes the resources associated with the current thread.

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Reference (javax.naming)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now