@SuppressWarnings( "unchecked" ) public static final <T> XMPPLogic process( final Object data1, final Object data2, final XMPPLogic logic, final XMPPServer<T> server, final Stanza<?, ?> stanza ) throws MessageException { XMPPLogic l = logic; while( l != null ) { if( log.isDebugEnabled() ) { debug( l, stanza ); } l = l.process( server, data1, data2, stanza ); } return null; } }
@SuppressWarnings( "unchecked" ) public static final <T> XMPPLogic process( final Object data1, final Object data2, final XMPPLogic logic, final XMPPServer<T> server, final Iq<?, ?> iq ) throws MessageException { XMPPLogic l = logic; while( l != null ) { if( log.isDebugEnabled() ) { debug( l, iq ); } l = l.process( server, data1, data2, iq ); } return null; }
@SuppressWarnings( "unchecked" ) public static final <T> XMPPLogic process( final Object data1, final Object data2, final XMPPLogic logic, final XMPPServer<T> server, final Message<?, ?> message ) throws MessageException { XMPPLogic l = logic; while( l != null ) { if( log.isDebugEnabled() ) { debug( l, message ); } l = l.process( server, data1, data2, message ); } return null; }
@SuppressWarnings( "unchecked" ) public static final <T> XMPPLogic process( final Object data1, final Object data2, final XMPPLogic logic, final XMPPServer<T> server, final Presence<?, ?> presence ) throws MessageException { XMPPLogic l = logic; while( l != null ) { if( log.isDebugEnabled() ) { debug( l, presence ); } l = l.process( server, data1, data2, presence ); } return null; }
@Override public void run() if( log.isDebugEnabled() ) if( log.isDebugEnabled() ) if( log.isDebugEnabled() ) if( log.isDebugEnabled() )
private MucRoom getRoom( final MucService service, final Stanza message ) throws MessageException { final JID jid = message.getTo(); final MucRoom room = service.getRoomSet().get( jid.getNode() ); if( room == null ) { if( log.isDebugEnabled() ) { log.debug( "Room %s not found", jid ); } } else if( log.isDebugEnabled() ) { log.debug( "Room %s found", jid ); } return room; }
/** * {@inheritDoc} */ @Override public void consume( final uk.org.retep.util.messaging.Message<JID> message ) throws MessageException { final Stanza stanza = ( Stanza ) message; if( getLog().isDebugEnabled() ) { logStanza( stanza ); } try { stack.send( stanza ); } catch( Exception ex ) { throw new MessageException( ex ); } } }
/** * DelayedRunnableThreadPoolExecutor used just for Reference's. This * ThreadPoolExecutor is used primarily by {@link DelayedWeakReference} * * @return DelayedRunnableThreadPoolExecutor */ public static synchronized DelayedRunnableThreadPoolExecutor getDelayThreadPoolExecutor() { if( delayPool == null ) { if( log.isDebugEnabled() ) { log.debug( "Creating DelayedRunnableThreadPoolExecutor" ); } delayPool = new DelayedRunnableThreadPoolExecutor( 1, 10, 5L, TimeUnit.MINUTES, getThreadFactory() ); // Ensure we have the core thread started else the first entry will // run immediately delayPool.prestartCoreThread(); } return delayPool; }
throws MessageException if( getLog().isDebugEnabled() )
/** * Log the stanza if debugging is enabled. * * @param stanza */ protected final void logStanza( @Nonnull final Stanza stanza ) { if( getLog().isDebugEnabled() ) { try { // Marshall the entire stanza getLog().debug( getServer().marshallXml( stanza ) ); } catch( JAXBException je ) { // Fall back to the short method getLog().debug( XMPPUtil.toString( stanza ) ); } } }
public <D> void debug( final XMPPServer<D> server ) throws JAXBException { if( getLog().isDebugEnabled() ) { for( Iq iq : iqs ) { getLog().debug( server.marshallXml( iq ) ); } for( Message message : messages ) { getLog().debug( server.marshallXml( message ) ); } for( Presence presence : presences ) { getLog().debug( server.marshallXml( presence ) ); } } } }
throws MessageException if( serverLog.isDebugEnabled() )