Examples of RuntimeContext


Examples of org.apache.wink.common.RuntimeContext

            type = MediaType.APPLICATION_XML_TYPE;
        } else {
            type = MediaType.valueOf(contentType);
        }

        RuntimeContext runtimeContext = RuntimeContextTLS.getRuntimeContext();
        Providers providers = runtimeContext.getProviders();
        Class<? extends Object> cls = xmlWrapper.getValue().getClass();

        // this code ignores possible generic types
        // if in the future we would like to support the generic types
        // should check here if cls is GenericEntity and handle it
View Full Code Here

Examples of org.apache.wink.common.internal.runtime.RuntimeContext

            return;
        }

        ProvidersRegistry providersRegistry = request.getAttribute(ProvidersRegistry.class);
        ClientRuntimeContext runtimeContext = new ClientRuntimeContext(providersRegistry);
        RuntimeContext saved = RuntimeContextTLS.getRuntimeContext();
        RuntimeContextTLS.setRuntimeContext(runtimeContext);
        try {
            Class<?> type = entity.getClass();
            Type genericType = type;
            if (entity instanceof GenericEntity) {
View Full Code Here

Examples of org.apache.wink.common.internal.runtime.RuntimeContext

        }
        if (ClientResponse.class.equals(type)) {
            return (T)this;
        }
        ProvidersRegistry providersRegistry = getAttribute(ProvidersRegistry.class);
        RuntimeContext saved = RuntimeContextTLS.getRuntimeContext();
        ClientRuntimeContext runtimeContext = new ClientRuntimeContext(providersRegistry);
        RuntimeContextTLS.setRuntimeContext(runtimeContext);
        try {
            String contentType = getHeaders().getFirst(HttpHeaders.CONTENT_TYPE);
            MediaType contentMediaType = MediaType.valueOf(contentType);
View Full Code Here

Examples of org.apache.wink.common.internal.runtime.RuntimeContext

                                      new InvocationHandler() {
                                          public Object invoke(Object proxy,
                                                               Method method,
                                                               Object[] args) throws Throwable {
                                              // use runtimeContext from TLS
                                              RuntimeContext runtimeContext =
                                                  RuntimeContextTLS.getRuntimeContext();
                                              // get the real context from the
                                              // RuntimeContext
                                              Object context =
                                                  runtimeContext.getAttribute(contextClass);
                                              // invoke the method on the real
                                              // context
                                              return method.invoke(context, args);
                                          }
                                      });
View Full Code Here

Examples of org.apache.wink.common.internal.runtime.RuntimeContext

* follow the specification and do checks for it (i.e. Tomcat).
*/
public class HttpServletRequestWrapperImpl extends HttpServletRequestWrapper {

    private HttpServletRequestWrapper getCorrectRequest() {
        RuntimeContext context = RuntimeContextTLS.getRuntimeContext();
        if (context == null) {
            throw new IllegalStateException();
        }

        HttpServletRequestWrapper wrapper =
View Full Code Here

Examples of org.apache.wink.common.internal.runtime.RuntimeContext

* strictly follow the specification and do checks for it (i.e. Tomcat).
*/
public class HttpServletResponseWrapperImpl extends HttpServletResponseWrapper {

    private HttpServletResponseWrapper getCorrectResponse() {
        RuntimeContext context = RuntimeContextTLS.getRuntimeContext();
        if (context == null) {
            throw new IllegalStateException();
        }

        HttpServletResponseWrapper wrapper =
View Full Code Here

Examples of org.eclipse.birt.chart.factory.RunTimeContext

        // TO
        // POINTS

        // GENERATE AND RENDER THE CHART
        final Generator gr = Generator.instance();
        RunTimeContext rtc = new RunTimeContext();

        GeneratedChartState state = gr.build(deviceRenderer.getDisplayServer(), cm, bo, null, rtc, null);

        gr.render(deviceRenderer, state);
      } catch (Exception ex) {
View Full Code Here

Examples of org.fireflow.engine.RuntimeContext

     */
    @Ignore
    @Test
    public void testSetRuntimeContext() {
        System.out.println("setRuntimeContext");
        RuntimeContext ctx = null;
        PersistenceServiceHibernateImpl instance = new PersistenceServiceHibernateImpl();
        instance.setRuntimeContext(ctx);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
View Full Code Here

Examples of org.huihoo.workflow.rules.RuntimeContext

    List transList = workActivity.getOutgoingTransitions();
    WorkflowProcess workflowProcess = workActivity.getWorkflowProcess();
    WorkflowPackage workflowPackage = workflowProcess.getWorkflowPackage();
    ScriptInterpretor interpretor = workflowService.getScriptInterpretor();

    RuntimeContext context = null;
    WorkflowCase workflowCase = workflowWork.getWorkflowCase();
    WorkflowCaseContext caseContext = workflowCase.getCaseContext();

    int sizeTrans = transList.size();
    if (sizeTrans > 0)
    {
      WorkflowTransition transition = null;

      for (int i = 0; i < sizeTrans; ++i)
      {
        if (context != null)
        {
          context.clear();
        }
        transition = (WorkflowTransition) transList.get(i);
        context = genParameterConext(caseContext, transition);

        WorkflowCondition conditon = transition.getCondition();
View Full Code Here

Examples of org.metatype.sxc.jaxb.RuntimeContext

        if (reader.isXsiNil()) {
            return null;
        }

        if (context == null) {
            context = new RuntimeContext();
        }

        final SessionBean sessionBean = new SessionBean();
        context.beforeUnmarshal(sessionBean, org.metatype.sxc.jaxb.LifecycleCallback.NONE);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.