public CollectionDataTransport getCollectionDataTransport() { DispatcherContext context=DispatcherContext.getInstance(); return context.getCollectionDataTransport(); } };
public DispatchAgentHeartbeatHelper (DispatchConfiguration configInstance, DispatcherContext context, CollectionSettingsRegistry registry) { this(configInstance.getInsightAgentConfig(), context, registry); }
public EncoderFactory getEncoderFactory () throws ClassNotFoundException, InstantiationException, IllegalAccessException { synchronized(encoderURI) { if (factory == null) { factory = DispatcherContext.getEncoderFactory(encoderURI); } return factory; } } /**
public static final InsightAgentRuntimeState createInitialRuntimeState () { DispatchConfiguration configInstance=DispatchConfiguration.getInstance(); return createInitialRuntimeState(configInstance.getInsightAgentConfig(), DispatcherContext.getInstance(), CollectionSettingsRegistry.getInstance()); }
public CollectionDataTransportFactory getCollectionDataTransportFactory () { synchronized(transportLock) { if (transportFactory == null) { try { transportFactory=getCollectionDataTransportFactory(dispatchConfig.getTransportURI()); transportFactory.setEncoderFactory(getEncoderFactory()); } catch(Exception e) { throw ExceptionUtils.toRuntimeException(e, true); } } return transportFactory; } }
public Decoder getDecoder () { synchronized(encoderLock) { if (decoder == null) { EncoderFactory factory=getEncoderFactory(); decoder = factory.createDecoder(); } return decoder; } }
public Encoder getEncoder () { synchronized(encoderLock) { if (encoder == null) { EncoderFactory factory=getEncoderFactory(); encoder = factory.createEncoder(); } return encoder; } }
public EncoderFactory getEncoderFactory () { synchronized(encoderLock) { if (encoderFactory == null) { try { encoderFactory = getEncoderFactory(dispatchConfig.getEncoderURI()); } catch(Exception e) { throw ExceptionUtils.toRuntimeException(e, true); } } return encoderFactory; } }
TraceIdGenerator resolveGenerator () { /* * Note: delay the actual access until needed - give more time for configuration to kick in */ if (generator == null) { DispatchConfiguration dispatchConfig=DispatchConfiguration.getInstance(); ServerName agentName=dispatchConfig.getServerName(); generator = new AgentTraceIdGenerator(agentName); } return generator; } }
public ResourceProperties getDispatcherResourceProperties () { synchronized(configLock) { if (serverProps == null) { ServerName serverName=getServerName(); SystemInformation info=getDispatcherSystemInformation(); serverProps = ResourcePropertiesFactory.DEFAULT.createServerPropertiesFromSystemInformation(serverName, info); } return serverProps; } }
public String getServerLabel () { synchronized(configLock) { if (serverLabel == null) { ServerName serverName=getServerName(); ResourceProperties props=getDispatcherResourceProperties(); serverLabel = ServerResourceLabelMaker.createServerLabel(serverName, props); } return serverLabel; } }
private DispatchConfiguration() { super(DispatchAgentPropertiesOverride.getInstance(), resolveInsightAgentPluginsHelper().getInsight(), SystemPropertiesSystemInformation.getInstance(), EnvironmentSystemInformation.getInstance()); }
public URI getTransportURI() throws URISyntaxException { if (transportURI == null) { String uriValue=getProperty(DISPATCH_TRANSPORT_PROP, DEFAULT_TRANSPORT_VALUE); transportURI = new URI(uriValue); } return transportURI; }
public ServerName getServerName () { return dispatchConfig.getServerName(); }
DispatchAgentPropertiesOverride (File file) { this((file == null) ? null : loadFromFile(file)); }
public String getProperty(String name) { return getProperty(name, null); }
private DispatcherContext() { this(DispatchConfiguration.getInstance()); }
static <O> O createDerivedInstance (URI uri, Class<O> baseClass) throws ClassNotFoundException, InstantiationException, IllegalAccessException { return createDerivedInstance(uri.getScheme(), uri, baseClass); }
public ServerName getServerName () { InsightAgentConfig config=getInsightAgentConfig(); return config.getServerName(); }
public URI getEncoderURI () throws URISyntaxException { if (encoderURI == null) { String uriValue=getProperty(DISPATCH_ENCODER_PROP, DEFAULT_ENCODER_VALUE); encoderURI = new URI(uriValue); } return encoderURI; }