/** * {@inheritDoc} */ @Override public void deserializationComplete(Beacon beacon) { this.sessionId = beacon.getSessionID(); }
/** * {@inheritDoc} */ @Override public void deserializationComplete(Beacon beacon) { super.resolveRelativeUrl(baseUrl); }
protected void initMocks(AbstractRequest targetElement) { when(pageLoadRequestSpan.getDetails()).thenReturn(pageLoadRequest); when(pageLoadRequest.getOwningSpan()).thenReturn(pageLoadRequestSpan); when(sessionInfo.getSessionId()).thenReturn(SESSION_ID); when(pageLoadRequestSpan.getSessionId()).thenReturn(SESSION_ID); when(pageLoadRequestSpan.getTabId()).thenReturn(TAB_ID); if (targetElement != null) { EUMSpan span = Mockito.mock(EUMSpan.class); when(span.getDetails()).thenReturn(targetElement); when(targetElement.getOwningSpan()).thenReturn(span); when(span.getSessionId()).thenReturn(SESSION_ID); when(span.getTabId()).thenReturn(TAB_ID); when(targetElement.getUrl()).thenReturn(URL); } // assign data when(sessionInfo.getBrowser()).thenReturn(BROWSER); when(sessionInfo.getDevice()).thenReturn(DEVICE); when(sessionInfo.getLanguage()).thenReturn(LANGUAGE); when(pageLoadRequest.getUrl()).thenReturn(PAGELOAD_URL); }
@BeforeMethod public void setup() { subBuilder = new DummyPointBuilder(); builder = new EUMCachingParentPointBuilder(Collections.<AbstractEUMPointBuilder<?>> singletonList(subBuilder)); when(sessionInfo.getSessionId()).thenReturn(SESSION_ID); EUMSpan plrSpan = Mockito.mock(EUMSpan.class); when(plrSpan.getDetails()).thenReturn(pageLoadRequest); when(pageLoadRequest.getOwningSpan()).thenReturn(plrSpan); when(plrSpan.getTabId()).thenReturn(TAB_ID); when(plrSpan.getSessionId()).thenReturn(SESSION_ID); }
/** * * Adds the basic data from {@link Series} and {@link Series#EUMBasicRequestSeries} to the * builder. Does not set the time of the point, this has to be done by the caller! * * @param sessionInfo * the sessionInfo belonging to the given request, can be null if unavailable * @param builder * the point builder for the record. * @param request * the request for which teh data point is built */ protected void addBasicRequestData(Builder builder, UserSessionInfo sessionInfo, R request) { if (sessionInfo != null) { builder.tag(Series.EUMBasicRequestSeries.TAG_BROWSER, sessionInfo.getBrowser()); builder.tag(Series.EUMBasicRequestSeries.TAG_DEVICE, sessionInfo.getDevice()); builder.tag(Series.EUMBasicRequestSeries.TAG_LANGUAGE, sessionInfo.getLanguage()); } builder.tag(Series.EUMBasicRequestSeries.TAG_URL, request.getUrl()); }
/** * {@inheritDoc} */ @Override public void deserializationComplete(Beacon beacon) { sessionId = beacon.getSessionID(); tabId = beacon.getTabID(); activeAgentModules = beacon.getActiveAgentModules(); details.deserializationComplete(beacon); Map<String, String> allTags = new HashMap<String, String>(); details.collectTags(allTags); this.addAllTags(allTags); }
/** * Sets teh details object. Should only be called once! * * @param eumDetails * the details. */ void setDetails(AbstractEUMSpanDetails eumDetails) { this.details = eumDetails; eumDetails.setOwningSpan(this); if (eumDetails.isAsyncCall() && !isRoot()) { setReferenceType(References.FOLLOWS_FROM); } else { setReferenceType(References.CHILD_OF); } this.setPropagationType(eumDetails.getPropagationType()); }
/** * {@inheritDoc} */ @Override public EUMSpan read(Kryo kryo, Input input, Class<EUMSpan> type) { EUMSpan read = super.read(kryo, input, type); read.getDetails().setOwningSpan(read); return read; } }, nextRegistrationId++);
/** * {@inheritDoc} */ @Override public boolean canBeProcessed(DefaultData data) { if (data instanceof EUMSpan) { AbstractEUMSpanDetails details = ((EUMSpan) data).getDetails(); if (details instanceof PageLoadRequest) { return true; } } return false; }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.baseUrl == null) ? 0 : this.baseUrl.hashCode()); result = (prime * result) + ((this.initiatorType == null) ? 0 : this.initiatorType.hashCode()); result = (prime * result) + (int) (this.transferSize ^ (this.transferSize >>> 32)); return result; }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.eventType == null) ? 0 : this.eventType.hashCode()); result = (prime * result) + (this.isAsyncEvent ? 1231 : 1237); return result; }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.url == null) ? 0 : this.url.hashCode()); return result; }
/** * {@inheritDoc} */ @Override public boolean isCaller() { return details.isExternalCall(); }
/** * Finalises the deserialization of all elements and optionally assigns a new session or tab ID. * * @param sessionID * the sessionID to assign * @param tabID * the tabID to assign */ public void deserializationComplete(long sessionID, long tabID) { this.sessionID = sessionID; this.tabID = tabID; for (EUMBeaconElement element : data) { element.deserializationComplete(this); } }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.elementID == null) ? 0 : this.elementID.hashCode()); result = (prime * result) + ((this.elementType == null) ? 0 : this.elementType.hashCode()); return result; }
/** * {@inheritDoc} */ @Override public void deserializationComplete(Beacon beacon) { super.resolveRelativeUrl(baseUrl); }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.baseUrl == null) ? 0 : this.baseUrl.hashCode()); result = (prime * result) + (this.isAsync ? 1231 : 1237); result = (prime * result) + ((this.method == null) ? 0 : this.method.hashCode()); result = (prime * result) + this.status; return result; }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); long temp; temp = Double.doubleToLongBits(this.configuredTimeout); result = (prime * result) + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.initiatorCallTimestamp); result = (prime * result) + (int) (temp ^ (temp >>> 32)); result = (prime * result) + this.iterationNumber; return result; }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + ((this.functionName == null) ? 0 : this.functionName.hashCode()); return result; }