src/main/java/org/xmpp/component/ExternalComponent.java
/**
     * Handle a received message and answer the weather information of the requested station id.
     * The request must be made using Message packets where the body of the message should be the
     * station id.<p>
     * <p/>
     * Note: I don't know the list of valid station ids so if you find the list please send it to me
     * so I can add it to this example.
     *
     * @param message the Message requesting information about a certain station id.
     */
Handle a received message and answer the weather information of the requested station id.
The request must be made using Message packets where the body of the message should be the
station id.

Note: I don't know the list of valid station ids so if you find the list please send it to me
so I can add it to this example.

@param message the Message requesting information about a certain station id.
Handle a received message and answer the weather information of the requested station id . The request must be made using Message packets where the body of the message should be the station id . Note : I don ' t know the list of valid station ids so if you find the list please send it to me so I can add it to this example . @param message the Message requesting information about a certain station id .
@Override
    protected void handleMessage(Message message) {
        final JID toJid = message.getTo();
        final JID fromJid = message.getFrom();
        final String body = message.getBody();
        if (toJid == null || fromJid == null || null == body || body.length() == 0) {
            send(_createPacketError(message, Condition.bad_request));
            return;
        }
        try {
            for (final MessageProcessor m : messageProcessors) {
                m.processMessage(message);
            }
        } catch (ServiceException e) {
            log.warn("Exception Handling Outgoing Message", e);
        }
    }
@ Override protected void handleMessage ( Message message ) { final JID toJid = message . getTo ( ) ; final JID fromJid = message . getFrom ( ) ; final String body = message . getBody ( ) ; if ( toJid == null || fromJid == null || null == body || body . length ( ) == 0 ) { send ( _createPacketError ( message , Condition . bad_request ) ) ; return ; } try { for ( final MessageProcessor m : messageProcessors ) { m . processMessage ( message ) ; } } catch ( ServiceException e ) { log . warn ( "Exception Handling Outgoing Message" , e ) ; } }
Handle a received message and answer the weather information of the requested station id.
Handle a received message and answer the weather information of the requested station id .