public class WeatherComponent extends AbstractComponent
Note: This code shouldn't be considered ready for production since it generate an HTTP request for each received request. Therefore, it won't scale much.
compMan, jid, NAMESPACE_DISCO_INFO, NAMESPACE_DISCO_ITEMS, NAMESPACE_ENTITY_TIME, NAMESPACE_LAST_ACTIVITY, NAMESPACE_XMPP_PING| Constructor and Description |
|---|
WeatherComponent(String name,
String serverDomain)
Create a new component which provides weather information.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription() |
String |
getDomain() |
String |
getName() |
protected void |
handleMessage(org.xmpp.packet.Message message)
Handle a receied message and answer the weather information of the requested station id.
|
discoInfoFeatureNamespaces, discoInfoIdentityCategory, discoInfoIdentityCategoryType, getJID, handleDiscoInfo, handleDiscoItems, handleEntityTime, handleIQError, handleIQGet, handleIQResult, handleIQSet, handleLastActivity, handlePing, handlePresence, initialize, postComponentShutdown, postComponentStart, preComponentShutdown, preComponentStart, processPacket, send, servesLocalUsersOnly, shutdown, startpublic String getName()
getName in interface ComponentgetName in class AbstractComponentpublic String getDescription()
getDescription in interface ComponentgetDescription in class AbstractComponentpublic String getDomain()
getDomain in class AbstractComponentprotected void handleMessage(org.xmpp.packet.Message message)
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.
handleMessage in class AbstractComponentmessage - the Message requesting information about a certain station id.Copyright © 2004–2015 Ignite Realtime. All rights reserved.