public SerializationFilter(String logCategory) { isDebug = Log.isDebug(); if (logCategory == null) logCategory = LogCategories.ENDPOINT_GENERAL; logger = Log.getLogger(logCategory); }
private void reportStatusIfDebug(String message) { String threadName = Thread.currentThread().getName(); if (Log.isDebug()) Log.getLogger(FLEX_CLIENT_LOG_CATEGORY).debug("Poll wait thread '" + threadName + "' for FlexClient with id '" + this.id + "' is " + message); }
private void reportStatusIfDebug(String message) { String threadName = Thread.currentThread().getName(); if (Log.isDebug()) Log.getLogger(FLEX_CLIENT_LOG_CATEGORY).debug("Poll wait thread '" + threadName + "' for FlexClient with id '" + this.id + "' is " + message); }
/** * Creates a new message receive thread. * Synchronized to uniquely identify each receive thread at construct time safely. * * @param r The runnable to assign to the new thread. */ public synchronized Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName("MessageReceiveThread" + "-" + receiveThreadCount++); t.setDaemon(true); if (Log.isDebug()) Log.getLogger(JMSAdapter.LOG_CATEGORY).debug("Created message receive thread: " + t.getName()); return t; }
/** * Creates a new message receive thread. * Synchronized to uniquely identify each receive thread at construct time safely. * * @param worker The runnable to assign to the new thread. */ public synchronized Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName("MessageReceiveThread" + "-" + receiveThreadCount++); if (Log.isDebug()) Log.getLogger(JMSAdapter.LOG_CATEGORY).debug("Created message receive thread: " + t.getName()); return t; }
/** * Creates a new message receive thread. * Synchronized to uniquely identify each receive thread at construct time safely. * * @param r The runnable to assign to the new thread. */ public synchronized Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName("MessageReceiveThread" + "-" + receiveThreadCount++); t.setDaemon(true); if (Log.isDebug()) Log.getLogger(JMSAdapter.LOG_CATEGORY).debug("Created message receive thread: " + t.getName()); return t; }
/** * This method is called in response to a ClusterMembershipListener's * notification that an Address has joined the Cluster. */ void addClusterNode(Address address) { // we avoid adding the node until it has channel and endpoint // information which interests us, but we log the fact that the // member was discovered if (Log.isDebug()) { Log.getLogger(LOG_CATEGORY).debug("Cluster node from address " + address + " joined the cluster for " + clusterId); } }
/** * In response to a ClusterMembershipListener's notification that an * Address has abandoned the Cluster, remove the node and avoid using * its channel and endpoint information in the future. */ void removeClusterNode(Address address) { clusterNodes.remove(address); sendRemoveNodeListener(address); if (Log.isDebug()) { Log.getLogger(LOG_CATEGORY).debug("Cluster node from address " + address + " abandoned the cluster for " + clusterId); } }
public void addSubscriber(String flexClientId, Object clientId, String selector, String subtopic) { synchronized (syncLock) { /* * Only process subscriptions for servers whose subscription state we have received * We may receive a subscribe/unsubscribe from a peer before we get their * subscription state... we ignore these since they will be included in the * state we receive later */ if (allSubscriptions.get(clientId) != null) super.addSubscriber(clientId, selector, subtopic, null); else if (Log.isDebug()) Log.getLogger(MessageService.LOG_CATEGORY).debug("Ignoring new remote subscription for server: " + clientId + " whose subscription state we have not yet received. selector: " + selector + " subtopic: " + subtopic); } }
public void addSubscriber(String flexClientId, Object clientId, String selector, String subtopic) { synchronized (syncLock) { /* * Only process subscriptions for servers whose subscription state we have received * We may receive a subscribe/unsubscribe from a peer before we get their * subscription state... we ignore these since they will be included in the * state we receive later */ if (allSubscriptions.get(clientId) != null) super.addSubscriber(clientId, selector, subtopic, null); else if (Log.isDebug()) Log.getLogger(MessageService.LOG_CATEGORY).debug("Ignoring new remote subscription for server: " + clientId + " whose subscription state we have not yet received. selector: " + selector + " subtopic: " + subtopic); } }
/** * We don't need to do anything here other than log out some info about the session that's shutting down. */ protected void internalInvalidate() { if (Log.isDebug()) Log.getLogger(FLEX_SESSION_LOG_CATEGORY).debug("FlexSession with id '" + getId() + "' for an Http-based client connection has been invalidated."); }
/** * We don't need to do anything here other than log out some info about the session that's shutting down. */ protected void internalInvalidate() { if (Log.isDebug()) Log.getLogger(FLEX_SESSION_LOG_CATEGORY).debug("FlexSession with id '" + getId() + "' for an Http-based client connection has been invalidated."); }
/** * We don't need to do anything here other than log out some info about the session that's shutting down. */ protected void internalInvalidate() { if (Log.isDebug()) Log.getLogger(FLEX_SESSION_LOG_CATEGORY).debug("FlexSession with id '" + getId() + "' for an Http-based client connection has been invalidated."); }
public void workCompleted(WorkEvent event) { // This only needs to be handled if execution of the Runnable failed. WorkException e = event.getException(); if (e != null) { if (Log.isDebug()) Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager's WorkListener.workCompleted() callback invoked for failed execution.", e); handleFailedExecution(((WorkCommandWrapper)event.getWork()).command, e); } } public void workRejected(WorkEvent event)
public void workRejected(WorkEvent event) { WorkException e = event.getException(); if (Log.isDebug()) Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager's WorkListener.workRejected() callback invoked. WorkException? " + e); handleFailedExecution(((WorkCommandWrapper)event.getWork()).command, e); } public void workStarted(WorkEvent event)
/** * Utility function to log the maxFrequency being used during subscription. * * @param maxFrequency The maxFrequency to log. */ void logMaxFrequencyDuringRegistration(int maxFrequency, SubscriptionInfo si) { if (Log.isDebug()) Log.getLogger(ThrottleManager.LOG_CATEGORY).debug("Outbound queue throttle manager for FlexClient '" + processor.getFlexClient().getId() + "' is using '" + maxFrequency + "' as the throttling limit for its subscription: " + StringUtils.NEWLINE + si); } }
/** * Utility function to log the maxFrequency being used during subscription. * * @param maxFrequency The maxFrequency to log. */ void logMaxFrequencyDuringRegistration(int maxFrequency, SubscriptionInfo si) { if (Log.isDebug()) Log.getLogger(ThrottleManager.LOG_CATEGORY).debug("Outbound queue throttle manager for FlexClient '" + processor.getFlexClient().getId() + "' is using '" + maxFrequency + "' as the throttling limit for its subscription: " + StringUtils.NEWLINE + si); } }
/** * Broadcast this subscribe/unsubscribe message to the cluster so everyone is aware * of this server's interest in messages matching this selector and subtopic. */ protected void sendSubscriptionToPeer(boolean subscribe, String selector, String subtopic) { if (Log.isDebug()) Log.getLogger(MessageService.LOG_CATEGORY).debug("Sending subscription to peers for subscribe? " + subscribe + " selector: " + selector + " subtopic: " + subtopic); ((MessageService)destination.getService()).sendSubscribeFromPeer(destination.getId(), subscribe ? Boolean.TRUE : Boolean.FALSE, selector, subtopic); }
/** * Broadcast this subscribe/unsubscribe message to the cluster so everyone is aware * of this server's interest in messages matching this selector and subtopic. * * @param subscribe are we subscribing? * @param selector the selector * @param subtopic the subtopic */ protected void sendSubscriptionToPeer(boolean subscribe, String selector, String subtopic) { if (Log.isDebug()) Log.getLogger(MessageService.LOG_CATEGORY).debug("Sending subscription to peers for subscribe? " + subscribe + " selector: " + selector + " subtopic: " + subtopic); ((MessageService)destination.getService()).sendSubscribeFromPeer(destination.getId(), subscribe, selector, subtopic); }
/** * Broadcast this subscribe/unsubscribe message to the cluster so everyone is aware * of this server's interest in messages matching this selector and subtopic. * * @param subscribe are we subscribing? * @param selector the selector * @param subtopic the subtopic */ protected void sendSubscriptionToPeer(boolean subscribe, String selector, String subtopic) { if (Log.isDebug()) Log.getLogger(MessageService.LOG_CATEGORY).debug("Sending subscription to peers for subscribe? " + subscribe + " selector: " + selector + " subtopic: " + subtopic); ((MessageService)destination.getService()).sendSubscribeFromPeer(destination.getId(), subscribe, selector, subtopic); }