/** * Constructs a <tt>SerializationFilter</tt>. * * @param logCategory Log category to use in logging. If <code>null</code>, the default values is <code>Endpoint.General</code>. */ public SerializationFilter(String logCategory) { if (logCategory == null) logCategory = LogCategories.ENDPOINT_GENERAL; logger = Log.getLogger(logCategory); }
/** * Constructs a <code>PropertyStringResourceLoader</code> that will use the * specified property bundles to use for string lookups. * * @param propertyBundles The list of the property bundles to use for lookups. */ public PropertyStringResourceLoader(String[] propertyBundles) { this.propertyBundles = propertyBundles; logger = Log.getLogger(LOG_CATEGORY); }
/** * Constructs a <code>PropertyStringResourceLoader</code> that will use the * specified property bundles to use for string lookups. * * @param propertyBundles The list of the property bundles to use for lookups. */ public PropertyStringResourceLoader(String[] propertyBundles) { this.propertyBundles = propertyBundles; logger = Log.getLogger(LOG_CATEGORY); }
/** * Constructs a <code>PropertyStringResourceLoader</code> that will use the * specified property bundles to use for string lookups. * * @param propertyBundles The list of the property bundles to use for lookups. */ public PropertyStringResourceLoader(String[] propertyBundles) { this.propertyBundles = propertyBundles; logger = Log.getLogger(LOG_CATEGORY); }
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); }
/** * Constructs an <code>AbstractEndpoint</code> with the indicated management. * * @param enableManagement <code>true</code> if the <code>AbstractEndpoint</code> * is manageable; otherwise <code>false</code>. */ public AbstractEndpoint(boolean enableManagement) { super(enableManagement); this.log = Log.getLogger(getLogCategory()); serializationContext = new SerializationContext(); }
/** * Constructs an <code>AbstractEndpoint</code> with the indicated management. * * @param enableManagement <code>true</code> if the <code>AbstractEndpoint</code> * is manageable; <code>false</code> otherwise. */ public AbstractEndpoint(boolean enableManagement) { super(enableManagement); this.log = Log.getLogger(getLogCategory()); serializationContext = new SerializationContext(); }
/** * Starts the <code>JMSProducer</code>. Subclasses should call <code>super.start</code>. */ public void start() throws NamingException, JMSException { super.start(); if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '" + destinationJndiName +"' is starting."); }
/** * 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."); }
/** * Starts the <code>JMSProducer</code>. Subclasses should call <code>super.start</code>. */ public void start() throws NamingException, JMSException { super.start(); if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '" + destinationJndiName +"' is starting."); }
/** * Starts the <code>JMSProducer</code>. Subclasses should call <code>super.start</code>. */ public void start() throws NamingException, JMSException { super.start(); if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '" + destinationJndiName +"' is starting."); }
protected void logInfo(ProxyContext context) { if (Log.isInfo()) { Target target = context.getTarget(); String prefix = "-- " + context.getMethod() + " : "; int targetPort = target.getUrl().getPort(); String targetURL = target.getUrl().getProtocol() + "://" + target.getUrl().getHost() + (targetPort == -1 ? "" : ":" + targetPort) + target.getEncodedPath(); Log.getLogger(HTTPProxyService.LOG_CATEGORY).info(prefix + targetURL); } }
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)
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)
/** * * Implements TimeoutCapable. * Inform the object that it has timed out. */ public void timeout() { if (Log.isInfo()) Log.getLogger(logCategory).info("Endpoint with id '" + endpoint.getId() + "' is timing out" + " a streaming connection for the FlexClient with id '" + flexClient.getId() + "'"); close(true /* disconnect client Channel */); }
/** * Removes the subscriber, unsubscribing it from all current subscriptions. * This is used by the admin UI. */ public void removeSubscriber(MessageClient client) { // Sends unsub messages for each subscription for this MessageClient which // should mean we remove the client at the end. client.invalidate(); if (getSubscriber(client.getClientId()) != null) Log.getLogger(MessageService.LOG_CATEGORY).error("Failed to remove client: " + client.getClientId()); }
/** * 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); }
/** * @exclude * Implements TimeoutCapable. * Inform the object that it has timed out. */ public void timeout() { if (Log.isInfo()) Log.getLogger(logCategory).info("Endpoint with id '" + endpoint.getId() + "' is timing out" + " a streaming connection for the FlexClient with id '" + flexClient.getId() + "'"); close(true /* disconnect client Channel */); }