@Override protected void startEndpoint(T endpoint) throws AxisFault { schedulePoll(endpoint); }
/** * Stop processing new messages, and wait the specified maximum time for in-flight * requests to complete before a controlled shutdown for maintenence * * @param millis a number of milliseconds to wait until pending requests are allowed to complete * @throws AxisFault on error */ public void maintenenceShutdown(long millis) throws AxisFault { if (state != BaseConstants.STARTED) return; stop(); state = BaseConstants.STOPPED; log.info("Listener shutdown"); } }
@Override protected void doInit() throws AxisFault { super.doInit(); // set the synchronise callback table if (cfgCtx.getProperty(BaseConstants.CALLBACK_TABLE) == null){ cfgCtx.setProperty(BaseConstants.CALLBACK_TABLE, new ConcurrentHashMap()); } }
/** * method to log a failure to the log file and to update the last poll status and time * @param msg text for the log message * @param e optional exception encountered or null * @param entry the PollTableEntry */ protected void processFailure(String msg, Exception e, T entry) { if (e == null) { log.error(msg); } else { log.error(msg, e); } long now = System.currentTimeMillis(); entry.setLastPollState(AbstractPollTableEntry.FAILED); entry.setLastPollTime(now); entry.setNextPollTime(now + entry.getPollInterval()); onPollCompletion(entry); }
@Override protected void stopEndpoint(PollTableEntry endpoint) { synchronized (endpoint) { endpoint.setCanceled(true); } super.stopEndpoint(endpoint); }
@Override public void destroy() { super.destroy(); fsManager.close(); }
@Override protected void doInit() throws AxisFault { super.doInit(); // set the synchronise callback table if (cfgCtx.getProperty(BaseConstants.CALLBACK_TABLE) == null){ cfgCtx.setProperty(BaseConstants.CALLBACK_TABLE, new ConcurrentHashMap()); } }
/** * method to log a failure to the log file and to update the last poll status and time * @param msg text for the log message * @param e optional exception encountered or null * @param entry the PollTableEntry */ protected void processFailure(String msg, Exception e, T entry) { if (e == null) { log.error(msg); } else { log.error(msg, e); } long now = System.currentTimeMillis(); entry.setLastPollState(AbstractPollTableEntry.FAILED); entry.setLastPollTime(now); entry.setNextPollTime(now + entry.getPollInterval()); onPollCompletion(entry); }
@Override protected void doInit() throws AxisFault { super.doInit(); // set the synchronise callback table if (cfgCtx.getProperty(BaseConstants.CALLBACK_TABLE) == null){ cfgCtx.setProperty(BaseConstants.CALLBACK_TABLE, new ConcurrentHashMap()); } }
@Override protected void startEndpoint(T endpoint) throws AxisFault { schedulePoll(endpoint); }
/** * Stop processing new messages, and wait the specified maximum time for in-flight * requests to complete before a controlled shutdown for maintenence * * @param millis a number of milliseconds to wait until pending requests are allowed to complete * @throws AxisFault on error */ public void maintenenceShutdown(long millis) throws AxisFault { if (state != BaseConstants.STARTED) return; stop(); state = BaseConstants.STOPPED; log.info("Listener shutdown"); } }
@Override protected void doInit() throws AxisFault { super.doInit(); try { StandardFileSystemManager fsm = new StandardFileSystemManager(); fsm.setConfiguration(getClass().getClassLoader().getResource("providers.xml")); fsm.init(); this.workerPool = super.workerPool; fsManager = fsm; Parameter lockFlagParam = getTransportInDescription().getParameter(VFSConstants.TRANSPORT_FILE_LOCKING); if (lockFlagParam != null) { String strLockingFlag = lockFlagParam.getValue().toString(); // by-default enabled, if explicitly specified as "disable" make it disable if (VFSConstants.TRANSPORT_FILE_LOCKING_DISABLED.equals(strLockingFlag)) { globalFileLockingFlag = false; } } } catch (FileSystemException e) { handleException("Error initializing the file transport : " + e.getMessage(), e); } }
protected void onPollCompletion(T entry) { if (!entry.isConcurrentPollingAllowed()) { synchronized (entry) { if (!entry.canceled) { schedulePoll(entry); } } } }
protected void onPollCompletion(T entry) { if (!entry.isConcurrentPollingAllowed()) { synchronized (entry) { if (!entry.canceled) { schedulePoll(entry); } } } }