@Override public FeedbackHandler getFeedbackHandler() { return m_agentContext.getHandler(FeedbackHandler.class); } }
private File getConfigDir() throws IOException { File dir = new File(getAgentContext().getWorkDir(), CONFIG_STORAGE_SUBDIR); if (!dir.exists() && !dir.mkdir()) { throw new IOException("Unable to access configuration directory: " + dir.getAbsolutePath()); } return dir; }
@Override public AgentUpdateHandler getAgentUpdateHandler() { return m_agentContext.getHandler(AgentUpdateHandler.class); }
protected final File getWorkDir() { return getAgentContext().getWorkDir(); }
private LoggingHandler getLoggingHandler() { return m_agentContext.getHandler(LoggingHandler.class); }
private File[] getLogFiles() { File[] files = new File(m_agentContext.getWorkDir(), "feedback").listFiles(); // sort files on storeId and fileNumber Arrays.sort(files, new Comparator<File>() { public int compare(File f1, File f2) { int result = (int) (getStoreId(f1) - getStoreId(f2)); if (result == 0) { int f1Number = getLogfileNumber(f1.getName(), getStoreName(getStoreId(f1))); int f2Number = getLogfileNumber(f2.getName(), getStoreName(getStoreId(f2))); result = f1Number - f2Number; } return result; } }); return files; }
private ConnectionHandler getConnectionHandler() { return m_agentContext.getHandler(ConnectionHandler.class); }
m_baseDir = new File(m_agentContext.getWorkDir(), DIRECTORY_NAME); if (!m_baseDir.isDirectory() && !m_baseDir.mkdirs()) { throw new IllegalArgumentException("Need valid dir");
@Override public ConfigurationHandler getConfigurationHandler() { return m_agentContext.getHandler(ConfigurationHandler.class); }
@Override public DeploymentHandler getDeploymentHandler() { return m_agentContext.getHandler(DeploymentHandler.class); }
protected final ConnectionHandler getConnectionHandler() { return getAgentContext().getHandler(ConnectionHandler.class); }
protected final DeploymentHandler getDeploymentHandler() { return getAgentContext().getHandler(DeploymentHandler.class); }
protected final AgentUpdateHandler getAgentUpdateHandler() { return getAgentContext().getHandler(AgentUpdateHandler.class); }
protected final EventsHandler getEventsHandler() { return getAgentContext().getHandler(EventsHandler.class); }
private String getTargetID() { IdentificationHandler idHandler = m_agentContext.getHandler(IdentificationHandler.class); return idHandler.getAgentId(); }
@Override public String getAgentId() { return m_agentContext.getHandler(IdentificationHandler.class).getAgentId(); }
protected final DownloadHandler getDownloadHandler() { return getAgentContext().getHandler(DownloadHandler.class); }
protected final ScheduledExecutorService getExecutorService() { return getAgentContext().getHandler(ScheduledExecutorService.class); }
private String getIdentification() { return m_agentContext.getHandler(IdentificationHandler.class).getAgentId(); }
private URL getServerURL() { return m_agentContext.getHandler(DiscoveryHandler.class).getServerUrl(); }