Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.dottydingo.service.endpoint.context;
  
  
 public class EndpointContext<REQ extends EndpointRequest,RES extends EndpointResponse,
         U extends UserContext>
 {
     protected Long requestId;
     protected REQ endpointRequest;
     protected RES endpointResponse;
     protected String correlationId;
     protected Trace trace;
     protected Throwable error;
     protected long startTimestamp = System.currentTimeMillis();
     protected long endTimestamp = -1;
     protected volatile boolean timedOut;
     protected volatile boolean complete;
     protected CompletionHandler completionHandler;
     protected U userContext;
 
     public void setCompletionHandler(CompletionHandler completionHandler)
     {
         this. = completionHandler;
     }
 
     public Long getRequestId()
     {
         return ;
     }
 
     public void setRequestId(Long requestId)
     {
         this. = requestId;
     }
 
     public REQ getEndpointRequest()
     {
         return ;
     }
 
     public void setEndpointRequest(REQ endpointRequest)
     {
         this. = endpointRequest;
     }
 
     public RES getEndpointResponse()
     {
         return ;
     }
 
     public void setEndpointResponse(RES endpointResponse)
     {
         this. = endpointResponse;
     }
 
     public String getCorrelationId()
     {
         return ;
     }
 
     public void setCorrelationId(String correlationId)
     {
         this. = correlationId;
     }
 
     public Trace getTrace()
     {
         return ;
     }
 
     public void setTrace(Trace trace)
     {
         this. = trace;
     }
 
     public Throwable getError()
     {
         return ;
     }
 
     public void setError(Throwable error)
     {
         this. = error;
     }
 
     public U getUserContext()
     {
         return ;
     }
 
     public void setUserContext(U userContext)
     {
         this. = userContext;
    }
    public void requestComplete()
    {
         = System.currentTimeMillis();
         = true;
        if( != null)
            .completeRequest(this);
    }
    public boolean isComplete()
    {
        return ;
    }
    public long getStartTimestamp()
    {
        return ;
    }
    public long getElapsedTime()
    {
        long end = ;
        if(end == -1)
            end = System.currentTimeMillis();
        return end - ;
    }
    public void setTimedOut()
    {
         = true;
    }
    public boolean isTimedOut()
    {
        return ;
    }
    {
        return ;
    }
    public void setEndpointAsyncContext(EndpointAsyncContext endpointAsyncContext)
    {
        this. = endpointAsyncContext;
    }
New to GrepCode? Check out our FAQ X