/** * Receive the next message from the underlying MessageConsumer within the * specified timeout interval. * * @param timeout The number of milliseconds to wait for a new message. * @throws JMSException The thrown JMS exception. */ public Message receive(long timeout) throws JMSException { if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info(Thread.currentThread() + " JMS consumer for JMS destination '" + destinationJndiName + "' is waiting " + timeout + " ms for new message to arrive"); return consumer.receive(timeout); }
/** * Receive the next message from the underlying MessageConsumer or wait * indefinetely until a message arrives if there is no message. * * @return The received JMS message. * @throws JMSException The thrown JMS exception. */ public Message receive() throws JMSException { if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info(Thread.currentThread() + " JMS consumer for JMS destination '" + destinationJndiName + "' is waiting forever until a new message arrives."); return consumer.receive(); }
/** * Receive the next message from the underlying MessageConsumer or wait * indefinetely until a message arrives if there is no message. * * @return The received JMS message. * @throws JMSException The thrown JMS exception. */ public Message receive() throws JMSException { if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info(Thread.currentThread() + " JMS consumer for JMS destination '" + destinationJndiName + "' is waiting forever until a new message arrives."); return consumer.receive(); }
/** * Receive the next message from the underlying MessageConsumer within the * specified timeout interval. * * @param timeout The number of milliseconds to wait for a new message. * @throws JMSException The thrown JMS exception. */ public Message receive(long timeout) throws JMSException { if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info(Thread.currentThread() + " JMS consumer for JMS destination '" + destinationJndiName + "' is waiting " + timeout + " ms for new message to arrive"); return consumer.receive(timeout); }
private int internalParsePort(String url) { int port = ChannelSettings.parsePort(url); // If there is no specified port, log an info message as urls without ports are supported if (port == 0 && Log.isInfo()) log.info("No port specified in channel URL: {0}", new Object[]{url}); return port == -1? 0 : port; // Replace -1 with 0. }
private int internalParsePort(String url) { int port = ChannelSettings.parsePort(url); // If there is no specified port, log an info message as urls without ports are supported if (port == 0 && Log.isInfo()) log.info("No port specified in channel URL: {0}", new Object[]{url}); return port == -1? 0 : port; // Replace -1 with 0. }
/** * 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."); }
/** * 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>JMSConsumer</code>. Subclasses should call <code>super.start</code>. * * @throws NamingException The thrown naming exception. * @throws JMSException The thrown JMS exception. */ public void start() throws NamingException, JMSException { super.start(); if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '" + destinationJndiName + "' is starting."); }
/** * Starts the <code>JMSConsumer</code>. Subclasses should call <code>super.start</code>. * * @throws NamingException The thrown naming exception. * @throws JMSException The thrown JMS exception. */ public void start() throws NamingException, JMSException { super.start(); if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '" + destinationJndiName + "' is starting."); }
/** * Starts the <code>JMSConsumer</code>. Subclasses should call <code>super.start</code>. * * @throws NamingException The thrown naming exception. * @throws JMSException The thrown JMS exception. */ public void start() throws NamingException, JMSException { super.start(); if (Log.isInfo()) Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer 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); } }
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); } } }
/** * * 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 */); }
/** * * 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 */); }
/** * @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 */); }
/** * Handle session destruction events. This will be invoked when the notifier's * associated session is invalidated, and this will trigger the notifier to close. * * @param flexSession The FlexSession being invalidated. */ public void sessionDestroyed(FlexSession flexSession) { if (Log.isInfo()) Log.getLogger(logCategory).info("Endpoint with id '" + endpoint.getId() + "' is closing" + " a streaming connection for the FlexClient with id '" + flexClient.getId() + "'" + " since its associated session has been destroyed."); close(true /* disconnect client Channel */); }
/** * Handle session destruction events. This will be invoked when the notifier's * associated session is invalidated, and this will trigger the notifier to close. * * @param flexSession The FlexSession being invalidated. */ public void sessionDestroyed(FlexSession flexSession) { if (Log.isInfo()) Log.getLogger(logCategory).info("Endpoint with id '" + endpoint.getId() + "' is closing" + " a streaming connection for the FlexClient with id '" + flexClient.getId() + "'" + " since its associated session has been destroyed."); close(true /* disconnect client Channel */); }
/** * Handle session destruction events. This will be invoked when the notifier's * associated session is invalidated, and this will trigger the notifier to close. * * @param flexSession The FlexSession being invalidated. */ public void sessionDestroyed(FlexSession flexSession) { if (Log.isInfo()) Log.getLogger(logCategory).info("Endpoint with id '" + endpoint.getId() + "' is closing" + " a streaming connection for the FlexClient with id '" + flexClient.getId() + "'" + " since its associated session has been destroyed."); close(true /* disconnect client Channel */); }