Index: lams_tool_chat/lib/smack-2.2.0/README.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/README.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/README.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,120 @@ + + + +
++
version: | +2.2.0 | +
released: | +March 9, 2006 | +
+Thank you for downloading Smack! +
+ +Start off by viewing the documentation +that can be found in the "documentation" directory included with this distribution. +
+Further information can be found on the +Smack website. If you need help using or would like to make contributions or +fixes to the code, please visit the +online forum. + +
About the Distribution
+ +The smack.jar file in the main distribution folder is the only binary file +required for embedding XMPP functionality into client applications. The optional +smackx.jar contains the Smack extensions +while smackx-debug.jar contains an enhanced debugger.
+ +If you downloaded the developer release, the full source of the library is included in +the source directory and can be compiled using the build scripts found in the +build directory (please see the README file in the build directory for further details). + +
Changelog and Upgrading
+ +View the changelog for a list of changes since the +last release. + +
License Agreements
+
+ Copyright 2002-2005 Jive Software. + + All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +
+2.2.0 -- March 9, 2006 +
+
+2.1.0 -- November 17, 2005 +
+! Warning: This release includes changes to the API. +
+2.0.0 -- August 27, 2005 +
+
+1.5.1 -- August 12, 2005 +
+
+1.5.0 -- March 30, 2005 +
+
+1.4.1 - November 15, 2004 +
+
+1.4.0 - August 10, 2004 +
+
+1.3.0 - March 11, 2004 +
+
+1.2.1 - September 28, 2003 +
+
+1.2.0 - August 29, 2003 +
+
+1.1.1 - June 25, 2003 +
+
+1.1.0 - June 19, 2003 +
+
+1.0.1 - April 30, 2003 +
+
+1.0.0 - April 25, 2003 +
+
+Smack includes two built-in debugging consoles that will let you track all XML traffic between +the client and server. A lite debugger which is part of the smack.jar +and an enhanced debugger contained in smackx-debug.jar. +
+ ++Debugging mode can be enabled in two different ways: +
+ ++ XMPPConnection.DEBUG_ENABLED = true;
+ +
+ java -Dsmack.debugEnabled=true SomeApp +
+If you wish to explicitly disable debug mode in your application, including using the command-line parameter, +add the following line to your application before opening new connections: +
+ ++XMPPConnection.DEBUG_ENABLED = false; +
+ ++Smack uses the following logic to decide the debugger console to use: +
+ ++ java -Dsmack.debuggerClass=my.company.com.MyDebugger SomeApp
+ +
+ +
+ +Allows to exchange structured data between users and applications for common +tasks such as registration and searching using Forms. + +
+JEP related: JEP-4 + ++ +Description
+ +An XMPP entity may need to gather data from another XMPP entity. Therefore, the data-gathering +entity will need to create a new Form, specify the fields that will conform the Form and finally +send the Form to the data-providing entity.
+ +Usage+ +In order to create a Form to fill out use the Form's constructor passing the constant +Form.TYPE_FORM as the parameter. The next step is to create the form fields and add them to +the form. In order to create and customize a FormField use the FormField's +constructor specifying the variable name of the field as the parameter. Then use setType(String type) +to set the field's type (e.g. FormField.TYPE_HIDDEN, FormField.TYPE_TEXT_SINGLE). Once we have the +Form instance and the FormFields the last step is to send addField(FormField field) +for each field that we want to add to the form.
+ +Once the form to fill out is finished we will want to send it in a message. Send getDataFormToSend() to +the form and add the answer as an extension to the message to send.
+ +Examples
+
+In this example we can see how to create and send a form to fill out:
+
++ +// Create a new form to gather data + Form formToSend = new Form(Form.TYPE_FORM); + formToSend.setInstructions( + "Fill out this form to report your case.\nThe case will be created automatically."); + formToSend.setTitle("Case configurations"); + // Add a hidden variable to the form + FormField field = new FormField("hidden_var"); + field.setType(FormField.TYPE_HIDDEN); + field.addValue("Some value for the hidden variable"); + formToSend.addField(field); + // Add a fixed variable to the form + field = new FormField(); + field.addValue("Section 1: Case description"); + formToSend.addField(field); + // Add a text-single variable to the form + field = new FormField("name"); + field.setLabel("Enter a name for the case"); + field.setType(FormField.TYPE_TEXT_SINGLE); + formToSend.addField(field); + // Add a text-multi variable to the form + field = new FormField("description"); + field.setLabel("Enter a description"); + field.setType(FormField.TYPE_TEXT_MULTI); + formToSend.addField(field); + + // Create a chat with "user2@host.com" + Chat chat = conn1.createChat("user2@host.com" ); + + Message msg = chat.createMessage(); + msg.setBody("To enter a case please fill out this form and send it back to me"); + // Add the form to fill out to the message to send + msg.addExtension(formToSend.getDataFormToSend()); + + // Send the message with the form to fill out + chat.sendMessage(msg); ++
+ +Description
+ +Under many situations an XMPP entity could receive a form to fill out. For example, some hosts +may require to fill out a form in order to register new users. Smack lets the data-providing entity +to complete the form in an easy way and send it back to the data-gathering entity.
+ +Usage+ +The form to fill out contains useful information that could be used for rendering the form. But it +cannot be used to actually complete it. Instead it's necessary to create a new form based on the original +form whose purpose is to hold all the answers.
+ +In order to create a new Form to complete based on the original Form just send +createAnswerForm() to the original Form. Once you have a valid form that could be actually +completed all you have to do is send setAnswer(String variable, String value) to the form where variable +is the variable of the FormField that you want to answer and value is the String representation +of the answer. If the answer consist of several values you could then use setAnswer(String variable, List values) +where values is a List of Strings.
+ +Once the form has been completed we will want to send it back in a message. Send getDataFormToSend() to +the form and add the answer as an extension to the message to send back.
+ +Examples
+
+In this example we can see how to retrieve a form to fill out, complete the form and send it back:
+
++ + + \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/disco.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/disco.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/disco.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,236 @@ + + +// Get the message with the form to fill out + Message msg2 = chat2.nextMessage(); + // Retrieve the form to fill out from the message + Form formToRespond = Form.getFormFrom(msg2); + // Obtain the form to send with the replies + Form completedForm = formToRespond.createAnswerForm(); + // Add the answers to the form + completedForm.setAnswer("name", "Credit card number invalid"); + completedForm.setAnswer( + "description", + "The ATM says that my credit card number is invalid. What's going on?"); + + msg2 = chat2.createMessage(); + msg2.setBody("To enter a case please fill out this form and send it back to me"); + // Add the completed form to the message to send back + msg2.addExtension(completedForm.getDataFormToSend()); + // Send the message with the completed form + chat2.sendMessage(msg2); ++
+ +The service discovery extension allows to discover items and information about XMPP +entities. Follow these links to learn how to use this extension. + +
+ +Description
+ +Any XMPP entity may receive a discovery request and must answer with its associated items or +information. Therefore, your Smack client may receive a discovery request that must respond +to (i.e., if your client supports XHTML-IM). This extension automatically responds to a +discovery request with the information that you previously configured.
+ +Usage
+
+In order to configure the supported features by your client you should first obtain the
+ServiceDiscoveryManager associated with your XMPPConnection. To get your ServiceDiscoveryManager
+send getInstanceFor(connection) to the class ServiceDiscoveryManager where
+connection is your XMPPConnection.
Once you have your ServiceDiscoveryManager you will be able to manage the supported features. To +register a new feature send addFeature(feature) to your ServiceDiscoveryManager +where feature is a String that represents the supported feature. To remove a supported feature send +removeFeature(feature) to your ServiceDiscoveryManager where feature is a +String that represents the feature to remove.
+ +Examples
+
+In this example we can see how to add and remove supported features:
+
++ +// Obtain the ServiceDiscoveryManager associated with my XMPPConnection + ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); + + // Register that a new feature is supported by this XMPP entity + discoManager.addFeature(namespace1); + + // Remove the specified feature from the supported features by this XMPP entity + discoManager.removeFeature(namespace2); ++
+ +Description
+ +Your XMPP entity may receive a discovery request for items non-addressable as a JID such as +the MUC rooms where you are joined. In order to answer the correct information it is necessary +to configure the information providers associated to the items/nodes within the Smack client.
+ +Usage
+
+In order to configure the associated nodes within the Smack client you will need to create a
+NodeInformationProvider and register it with the ServiceDiscoveryManager. To get
+your ServiceDiscoveryManager send getInstanceFor(connection) to the class ServiceDiscoveryManager
+where connection is your XMPPConnection.
Once you have your ServiceDiscoveryManager you will be able to register information providers +for the XMPP entity's nodes. To register a new node information provider send setNodeInformationProvider(String node, NodeInformationProvider listener) +to your ServiceDiscoveryManager where node is the item non-addressable as a JID and +listener is the NodeInformationProvider to register. To unregister a NodeInformationProvider +send removeNodeInformationProvider(String node) to your ServiceDiscoveryManager where +node is the item non-addressable as a JID whose information provider we want to unregister.
+ +Examples
+
+In this example we can see how to register a NodeInformationProvider with a ServiceDiscoveryManager that will provide
+information concerning a node named "http://jabber.org/protocol/muc#rooms":
+
++ +// Set the NodeInformationProvider that will provide information about the + // joined rooms whenever a disco request is received + ServiceDiscoveryManager.getInstanceFor(connection).setNodeInformationProvider( + "http://jabber.org/protocol/muc#rooms", + new NodeInformationProvider() { + public Iterator getNodeItems() { + ArrayList answer = new ArrayList(); + Iterator rooms = MultiUserChat.getJoinedRooms(connection); + while (rooms.hasNext()) { + answer.add(new DiscoverItems.Item((String)rooms.next())); + } + return answer.iterator(); + } + }); ++
+ +Description
+ +In order to obtain information about a specific item you have to first discover the items available +in an XMPP entity.
+ +Usage+ +
Once you have your ServiceDiscoveryManager you will be able to discover items associated with +an XMPP entity. To discover the items of a given XMPP entity send discoverItems(entityID) +to your ServiceDiscoveryManager where entityID is the ID of the entity. The message +discoverItems(entityID) will answer an instance of DiscoverItems that contains +the discovered items.
+ +Examples
+
+In this example we can see how to discover the items associated with an online catalog service:
+
++ +// Obtain the ServiceDiscoveryManager associated with my XMPPConnection + ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); + + // Get the items of a given XMPP entity + // This example gets the items associated with online catalog service + DiscoverItems discoItems = discoManager.discoverItems("plays.shakespeare.lit"); + + // Get the discovered items of the queried XMPP entity + Iterator it = discoItems.getItems(); + // Display the items of the remote XMPP entity + while (it.hasNext()) { + DiscoverItems.Item item = (DiscoverItems.Item) it.next(); + System.out.println(item.getEntityID()); + System.out.println(item.getNode()); + System.out.println(item.getName()); + } ++
+ +Description
+ +Once you have discovered the entity ID and name of an item, you may want to find out more +about the item. The information desired generally is of two kinds: 1) The item's identity +and 2) The features offered by the item.
+ +This information helps you determine what actions are possible with regard to this +item (registration, search, join, etc.) as well as specific feature types of interest, if +any (e.g., for the purpose of feature negotiation).
+ +Usage+ +
Once you have your ServiceDiscoveryManager you will be able to discover information associated with +an XMPP entity. To discover the information of a given XMPP entity send discoverInfo(entityID) +to your ServiceDiscoveryManager where entityID is the ID of the entity. The message +discoverInfo(entityID) will answer an instance of DiscoverInfo that contains +the discovered information.
+ +Examples
+
+In this example we can see how to discover the information of a conference room:
+
++ +// Obtain the ServiceDiscoveryManager associated with my XMPPConnection + ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); + + // Get the information of a given XMPP entity + // This example gets the information of a conference room + DiscoverInfo discoInfo = discoManager.discoverInfo("balconyscene@plays.shakespeare.lit"); + + // Get the discovered identities of the remote XMPP entity + Iterator it = discoInfo.getIdentities(); + // Display the identities of the remote XMPP entity + while (it.hasNext()) { + DiscoverInfo.Identity identity = (DiscoverInfo.Identity) it.next(); + System.out.println(identity.getName()); + System.out.println(identity.getType()); + System.out.println(identity.getCategory()); + } + + // Check if room is password protected + discoInfo.containsFeature("muc_passwordprotected"); ++
+ +Description
+ +Publish your entity items to some kind of persistent storage. This enables other entities to query +that entity using the disco#items namespace and receive a result even when the entity being queried +is not online (or available).
+ +Usage+ +
Once you have your ServiceDiscoveryManager you will be able to publish items to some kind of +persistent storage. To publish the items of a given XMPP entity you have to first create an instance +of DiscoverItems and configure it with the items to publish. Then you will have to +send publishItems(String entityID, DiscoverItems discoverItems) to your ServiceDiscoveryManager +where entityID is the address of the XMPP entity that will persist the items and discoverItems contains the items +to publish.
+ +Examples
+
+In this example we can see how to publish new items:
+
++ + + \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/filetransfer.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/filetransfer.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/filetransfer.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,178 @@ + + + + +// Obtain the ServiceDiscoveryManager associated with my XMPPConnection + ServiceDiscoveryManager discoManager = ServiceDiscoveryManager.getInstanceFor(connection); + + // Create a DiscoverItems with the items to publish + DiscoverItems itemsToPublish = new DiscoverItems(); + DiscoverItems.Item itemToPublish = new DiscoverItems.Item("pubsub.shakespeare.lit"); + itemToPublish.setName("Avatar"); + itemToPublish.setNode("romeo/avatar"); + itemToPublish.setAction(DiscoverItems.Item.UPDATE_ACTION); + itemsToPublish.addItem(itemToPublish); + + // Publish the new items by sending them to the server + discoManager.publishItems("host", itemsToPublish); ++
+ +The file transfer extension allows the user to transmit and receive files. + +
+ +Description
+ +A user may wish to send a file to another user. The other user has the option of acception, +rejecting, or ignoring the users request. Smack provides a simple interface in order +to enable the user to easily send a file. + +Usage
+ +In order to send a file you must first construct an instance of the FileTransferManager +class. This class has one constructor with one parameter which is your XMPPConnection. +In order to instantiate the manager you should call new FileTransferManager(connection) + +
Once you have your FileTransferManager you will need to create an outgoing +file transfer to send a file. The method to use on the FileTransferManager +is the createOutgoingFileTransfer(userID) method. The userID you provide to this +method is the fully-qualified jabber ID of the user you wish to send the file to. A +fully-qualified jabber ID consists of a node, a domain, and a resource, the user +must be connected to the resource in order to be able to recieve the file transfer. + +
Now that you have your OutgoingFileTransfer instance you will want +to send the file. The method to send a file is sendFile(file, description). The file + you provide to this method should be a readable file on the local file system, and the description is a short + description of the file to help the user decide whether or not they would like to recieve the file. + +
For information on monitoring the progress of a file transfer see the monitoring progress +section of this document. + +
Other means to send a file are also provided as part of the OutgoingFileTransfer. Please +consult the Javadoc for more information. + + +Examples
+
+In this example we can see how to send a file:
+
++ ++ // Create the file transfer manager + FileTransferManager manager = new FileTransferManager(connection); + + // Create the outgoing file transfer + OutgoingFileTransfer transfer = manager.createOutgoingFileTransfer("romeo@montague.net"); + + // Send the file + transfer.sendFile(new File("shakespeare_complete_works.txt"), "You won't believe this!"); + ++
+ +Description
+ +The user may wish to recieve files from another user. The process of recieving a file is event driven, +new file transfer requests are recieved from other users via a listener registered with the file transfer +manager.
+ +Usage+ +In order to recieve a file you must first construct an instance of the FileTransferManager +class. This class has one constructor with one parameter which is your XMPPConnection. +In order to instantiate the manager you should call new FileTransferManager(connection) + +
Once you have your FileTransferManager you will need to register a listener +with it. The FileTransferListner interface has one method, fileTransferRequest(request). +When a request is recieved through this method, you can either accept or reject the +request. To help you make your decision there are several methods in the FileTransferRequest +class that return information about the transfer request. + +
To accept the file transfer, call the accept(), +this method will create an IncomingFileTransfer. After you have the file transfer you may start +to transfer the file by calling the recieveFile(file) method. +The file provided to this method will be where the data from thefile transfer is saved.
+ +Finally, to reject the file transfer the only method you need to call is reject() +on the IncomingFileTransfer. + +
For information on monitoring the progress of a file transfer see the monitoring progress +section of this document. + +
Other means to recieve a file are also provided as part of the IncomingFileTransfer. Please +consult the Javadoc for more information. + +Examples
+
+In this example we can see how to approve or reject a file transfer request:
+
++ +// Create the file transfer manager + final FileTransferManager manager = new FileTransferManager(connection); + + // Create the listener + manager.addFileTransferListener(new FileTransferListener() { + public void fileTransferRequest(FileTransferRequest request) { + // Check to see if the request should be accepted + if(shouldAccept(request)) { + // Accept it + IncomingFileTransfer transfer = request.accept(); + transfer.recieveFile(new File("shakespeare_complete_works.txt")); + } else { + // Reject it + request.reject(); + } + } + }); ++
+ +Description
+ +While a file transfer is in progress you may wish to monitor the progress of a file transfer.
+ +Usage+ +
Both the IncomingFileTransfer and the OutgoingFileTransfer +extend the FileTransfer class which provides several methods to monitor +how a file transfer is progressing: +
+
+In this example we can see how to monitor a file transfer:
+
++ + + Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/index.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/index.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/index.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,15 @@ + + + +while(!transfer.isDone()) { + if(transfer.getStatus().equals(Status.ERROR)) { + System.out.println("ERROR!!! " + transfer.getError()); + } else { + System.out.println(transfer.getStatus()); + System.out.println(transfer.getProgress()); + } + sleep(1000); + } ++
The XMPP protocol includes a base protocol and many optional extensions + typically documented as "JEP's". Smack provides the org.jivesoftware.smack + package for the core XMPP protocol, and the org.jivesoftware.smackx package for + many of the protocol extensions.
+ +This manual provides details about each of the "smackx" extensions, including what + it is, how to use it, and some simple example code.
+ +
+ +
Name | JEP # | Description | +
Private Data | +JEP-49 | +Manages private data. | +
XHTML Messages | +JEP-71 | +Allows send and receiving formatted messages using XHTML. | +
Message Events | +JEP-22 | +Requests and responds to message events. | +
Data Forms | +JEP-4 | +Allows to gather data using Forms. | +
Multi User Chat | +JEP-45 | +Allows configuration of, participation in, and administration of individual text-based conference rooms. | +
Roster Item Exchange | +JEP-93 | +Allows roster data to be shared between users. | +
Time Exchange | +JEP-90 | +Allows local time information to be shared between users. | +
Group Chat Invitations | +N/A | +Send invitations to other users to join a group chat room. | +
Service Discovery | +JEP-30 | +Allows to discover services in XMPP entities. | +
File Transfer | +JEP-96 | +Transfer files between two users over XMPP. | +
+ +The group chat invitation packet extension is used to invite other +users to a group chat room. + +
+ ++JEP related: N/A -- this protocol is outdated now that the Multi-User Chat (MUC) JEP is available +(JEP-45). However, most +existing clients still use this older protocol. Once MUC support becomes more +widespread, this API may be deprecated. + +
+ +To use the GroupChatInvitation packet extension +to invite another user to a group chat room, address a new message to the +user and set the room name appropriately, as in the following code example: + +
+Message message = new Message("user@chat.example.com"); +message.setBody("Join me for a group chat!"); +message.addExtension(new GroupChatInvitation("room@chat.example.com")); +con.sendPacket(message); ++ +The XML generated for the invitation portion of the code above would be: + +
+<x xmlns="jabber:x:conference" jid="room@chat.example.com"/> +
+ +
+ +To listen for group chat invitations, use a PacketExtensionFilter for the +x element name and jabber:x:conference namespace, as in the +following code example: + +
+PacketFilter filter = new PacketExtensionFilter("x", "jabber:x:conference"); +// Create a packet collector or packet listeners using the filter... ++ + + + \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/messageevents.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/messageevents.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/messageevents.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,244 @@ + + +
+ +This extension is used to request and respond to events relating to the delivery, +display, and composition of messages. There are three stages in this extension:
For more information on each stage please follow these links:
++Description
+ +In order to receive event notifications for a given message you first have to specify +which events are you interested in. Each message that you send has to request its own event +notifications. Therefore, every message that you send as part of a chat should request its own event +notifications.
+ +Usage+ +The class MessageEventManager provides an easy way for requesting event notifications. All you have to do is specify +the message that requires the event notifications and the events that you are interested in. +
Use the static method MessageEventManager.addNotificationsRequests(Message message, boolean offline, boolean +delivered, boolean displayed, boolean composing) for requesting event notifications. +
+ +Example+Below you can find an example that logs in a user to the server, creates a message, adds the requests +for notifications and sends the message. +
++ +// Connect to the server and log in + conn1 = new XMPPConnection(host); + conn1.login(server_user1, pass1); + + // Create a chat with user2 + Chat chat1 = conn1.createChat(user2); + + // Create a message to send + Message msg = chat1.createMessage(); + msg.setSubject("Any subject you want"); + msg.setBody("An interesting body comes here..."); + // Add to the message all the notifications requests (offline, delivered, displayed, + // composing) + MessageEventManager.addNotificationsRequests(msg, true, true, true, true); + + // Send the message that contains the notifications request + chat1.sendMessage(msg); ++
+ +Description
+ +You can receive notification requests for the following events: delivered, displayed, composing and offline. You +must listen for these requests and react accordingly.
+ +Usage+ +The general idea is to create a new DefaultMessageEventRequestListener that will listen to the event notifications +requests and react with custom logic. Then you will have to add the listener to the +MessageEventManager that works on +the desired XMPPConnection. +
Note that DefaultMessageEventRequestListener is a default implementation of the +MessageEventRequestListener interface. +The class DefaultMessageEventRequestListener automatically sends a delivered notification to the sender of the message +if the sender has requested to be notified when the message is delivered. If you decide to create a new class that +implements the MessageEventRequestListener interface, please remember to send the delivered notification.
++ +Below you can find an example that connects two users to the server. One user will create a message, add the requests +for notifications and will send the message to the other user. The other user will add a +DefaultMessageEventRequestListener +to a MessageEventManager that will listen and react to the event notification requested by the other user. +
++ +// Connect to the server and log in the users + conn1 = new XMPPConnection(host); + conn1.login(server_user1, pass1); + conn2 = new XMPPConnection(host); + conn2.login(server_user2, pass2); + + // User2 creates a MessageEventManager + MessageEventManager messageEventManager = new MessageEventManager(conn2); + // User2 adds the listener that will react to the event notifications requests + messageEventManager.addMessageEventRequestListener(new DefaultMessageEventRequestListener() { + public void deliveredNotificationRequested( + String from, + String packetID, + MessageEventManager messageEventManager) { + super.deliveredNotificationRequested(from, packetID, messageEventManager); + // DefaultMessageEventRequestListener automatically responds that the message was delivered when receives this request + System.out.println("Delivered Notification Requested (" + from + ", " + packetID + ")"); + } + + public void displayedNotificationRequested( + String from, + String packetID, + MessageEventManager messageEventManager) { + super.displayedNotificationRequested(from, packetID, messageEventManager); + // Send to the message's sender that the message was displayed + messageEventManager.sendDisplayedNotification(from, packetID); + } + + public void composingNotificationRequested( + String from, + String packetID, + MessageEventManager messageEventManager) { + super.composingNotificationRequested(from, packetID, messageEventManager); + // Send to the message's sender that the message's receiver is composing a reply + messageEventManager.sendComposingNotification(from, packetID); + } + + public void offlineNotificationRequested( + String from, + String packetID, + MessageEventManager messageEventManager) { + super.offlineNotificationRequested(from, packetID, messageEventManager); + // The XMPP server should take care of this request. Do nothing. + System.out.println("Offline Notification Requested (" + from + ", " + packetID + ")"); + } + }); + + // User1 creates a chat with user2 + Chat chat1 = conn1.createChat(user2); + + // User1 creates a message to send to user2 + Message msg = chat1.createMessage(); + msg.setSubject("Any subject you want"); + msg.setBody("An interesting body comes here..."); + // User1 adds to the message all the notifications requests (offline, delivered, displayed, + // composing) + MessageEventManager.addNotificationsRequests(msg, true, true, true, true); + + // User1 sends the message that contains the notifications request + chat1.sendMessage(msg); + Thread.sleep(500); + // User2 sends to the message's sender that the message's receiver cancelled composing a reply + messageEventManager.sendCancelledNotification(user1, msg.getPacketID()); ++
+ +Description
+ +Once you have requested for event notifications you will start to receive notifications of events. You can +receive notifications of the following events: delivered, displayed, composing, offline and cancelled. You +will probably want to react to some or all of these events.
+ +Usage+ +The general idea is to create a new MessageEventNotificationListener that will listen to the event notifications +and react with custom logic. Then you will have to add the listener to the MessageEventManager that works on +the desired XMPPConnection. +
+Below you can find an example that logs in a user to the server, adds a MessageEventNotificationListener +to a MessageEventManager that will listen and react to the event notifications, creates a message, adds +the requests for notifications and sends the message. +
++ + + + \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/muc.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/muc.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/muc.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,619 @@ + + +// Connect to the server and log in + conn1 = new XMPPConnection(host); + conn1.login(server_user1, pass1); + + // Create a MessageEventManager + MessageEventManager messageEventManager = new MessageEventManager(conn1); + // Add the listener that will react to the event notifications + messageEventManager.addMessageEventNotificationListener(new MessageEventNotificationListener() { + public void deliveredNotification(String from, String packetID) { + System.out.println("The message has been delivered (" + from + ", " + packetID + ")"); + } + + public void displayedNotification(String from, String packetID) { + System.out.println("The message has been displayed (" + from + ", " + packetID + ")"); + } + + public void composingNotification(String from, String packetID) { + System.out.println("The message's receiver is composing a reply (" + from + ", " + packetID + ")"); + } + + public void offlineNotification(String from, String packetID) { + System.out.println("The message's receiver is offline (" + from + ", " + packetID + ")"); + } + + public void cancelledNotification(String from, String packetID) { + System.out.println("The message's receiver cancelled composing a reply (" + from + ", " + packetID + ")"); + } + }); + + // Create a chat with user2 + Chat chat1 = conn1.createChat(user2); + + // Create a message to send + Message msg = chat1.createMessage(); + msg.setSubject("Any subject you want"); + msg.setBody("An interesting body comes here..."); + // Add to the message all the notifications requests (offline, delivered, displayed, + // composing) + MessageEventManager.addNotificationsRequests(msg, true, true, true, true); + + // Send the message that contains the notifications request + chat1.sendMessage(msg); ++
+ +Allows configuration of, participation in, and administration of individual text-based conference rooms.
+ +
+ +Description
+ +Allowed users may create new rooms. There are two types of rooms that you can create. Instant rooms +which are available for immediate access and are automatically created based on some default +configuration and Reserved rooms which are manually configured by the room creator before +anyone is allowed to enter.
+ +Usage+ +In order to create a room you will need to first create an instance of MultiUserChat. The +room name passed to the constructor will be the name of the room to create. The next step is to send +create(String nickname) to the MultiUserChat instance where nickname is the nickname +to use when joining the room.
+ +Depending on the type of room that you want to create you will have to use different configuration forms. In +order to create an Instant room just send sendConfigurationForm(Form form) where form is an empty form. +But if you want to create a Reserved room then you should first get the room's configuration form, complete +the form and finally send it back to the server.
+ +Examples
+
+In this example we can see how to create an instant room:
+
++ +In this example we can see how to create a reserved room. The form is completed with default values:// Create a MultiUserChat using an XMPPConnection for a room + MultiUserChat muc = new MultiUserChat(conn1, "myroom@conference.jabber.org"); + + // Create the room + muc.create("testbot"); + + // Send an empty room configuration form which indicates that we want + // an instant room + muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT)); ++
++ +// Create a MultiUserChat using an XMPPConnection for a room + MultiUserChat muc = new MultiUserChat(conn1, "myroom@conference.jabber.org"); + + // Create the room + muc.create("testbot"); + + // Get the the room's configuration form + Form form = muc.getConfigurationForm(); + // Create a new form to submit based on the original form + Form submitForm = form.createAnswerForm(); + // Add default answers to the form to submit + for (Iterator fields = form.getFields(); fields.hasNext();) { + FormField field = (FormField) fields.next(); + if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null) { + // Sets the default value as the answer + submitForm.setDefaultAnswer(field.getVariable()); + } + } + // Sets the new owner of the room + List owners = new ArrayList(); + owners.add("johndoe@jabber.org"); + submitForm.setAnswer("muc#roomconfig_roomowners", owners); + // Send the completed form (with default values) to the server to configure the room + muc.sendConfigurationForm(submitForm); ++
+ +Description
+ +Your usual first step in order to send messages to a room is to join the room. Multi User Chat allows +to specify several parameter while joining a room. Basically you can control the amount of history to +receive after joining the room as well as provide your nickname within the room and a password if the +room is password protected.
+ +Usage+ +In order to join a room you will need to first create an instance of MultiUserChat. The +room name passed to the constructor will be the name of the room to join. The next step is to send +join(...) to the MultiUserChat instance. But first you will have to decide which +join message to send. If you want to just join the room without a password and without specifying the amount +of history to receive then you could use join(String nickname) where nickname if your nickname in +the room. In case the room requires a password in order to join you could then use +join(String nickname, String password). And finally, the most complete way to join a room is to send +join(String nickname, String password, DiscussionHistory history, long timeout) +where nickname is your nickname in the room, , password is your password to join the room, history is +an object that specifies the amount of history to receive and timeout is the milliseconds to wait +for a response from the server.
+ +Examples
+
+In this example we can see how to join a room with a given nickname:
+
++ +In this example we can see how to join a room with a given nickname and password:// Create a MultiUserChat using an XMPPConnection for a room + MultiUserChat muc2 = new MultiUserChat(conn1, "myroom@conference.jabber.org"); + + // User2 joins the new room + // The room service will decide the amount of history to send + muc2.join("testbot2"); ++
++ +In this example we can see how to join a room with a given nickname specifying the amount of history +to receive:// Create a MultiUserChat using an XMPPConnection for a room + MultiUserChat muc2 = new MultiUserChat(conn1, "myroom@conference.jabber.org"); + + // User2 joins the new room using a password + // The room service will decide the amount of history to send + muc2.join("testbot2", "password"); ++
++ +// Create a MultiUserChat using an XMPPConnection for a room + MultiUserChat muc2 = new MultiUserChat(conn1, "myroom@conference.jabber.org"); + + // User2 joins the new room using a password and specifying + // the amount of history to receive. In this example we are requesting the last 5 messages. + DiscussionHistory history = new DiscussionHistory(); + history.setMaxStanzas(5); + muc2.join("testbot2", "password", history, SmackConfiguration.getPacketReplyTimeout()); ++
+ +Description
+ +It can be useful to invite another user to a room in which one is an occupant. Depending on the +room's type the invitee could receive a password to use to join the room and/or be added to the +member list if the room is of type members-only. Smack allows to send room invitations and let +potential invitees to listening for room invitations and inviters to listen for invitees' +rejections.
+ +Usage+ +In order to invite another user to a room you must be already joined to the room. Once you are +joined just send invite(String participant, String reason) to the MultiUserChat +where participant is the user to invite to the room (e.g. hecate@shakespeare.lit) and reason is +the reason why the user is being invited.
+ +If potential invitees want to listen for room invitations then the invitee must add an InvitationListener +to the MultiUserChat class. Since the InvitationListener is an interface, +it is necessary to create a class that implements this interface. If an inviter wants to +listen for room invitation rejections, just add an InvitationRejectionListener +to the MultiUserChat. InvitationRejectionListener is also an +interface so you will need to create a class that implements this interface.
+ +Examples
+
+In this example we can see how to invite another user to the room and lister for possible rejections:
+
++ +In this example we can see how to listen for room invitations and decline invitations:// User2 joins the room + MultiUserChat muc2 = new MultiUserChat(conn2, room); + muc2.join("testbot2"); + + // User2 listens for invitation rejections + muc2.addInvitationRejectionListener(new InvitationRejectionListener() { + public void invitationDeclined(String invitee, String reason) { + // Do whatever you need here... + } + }); + + // User2 invites user3 to join to the room + muc2.invite("user3@host.org/Smack", "Meet me in this excellent room"); ++
++ +// User3 listens for MUC invitations + MultiUserChat.addInvitationListener(conn3, new InvitationListener() { + public void invitationReceived(XMPPConnection conn, String room, String inviter, String reason, String password) { + // Reject the invitation + MultiUserChat.decline(conn, room, inviter, "I'm busy right now"); + } + }); ++
+ +Description
+ +A user may want to discover if one of the user's contacts supports the Multi-User Chat protocol.
+ +Usage+ +In order to discover if one of the user's contacts supports MUC just send +isServiceEnabled(XMPPConnection connection, String user) to the MultiUserChat +class where user is a fully qualified XMPP ID, e.g. jdoe@example.com. You will receive +a boolean indicating whether the user supports MUC or not.
+ +Examples
+
+In this example we can see how to discover support of MUC:
+
++ +// Discover whether user3@host.org supports MUC or not + boolean supports = MultiUserChat.isServiceEnabled(conn, "user3@host.org/Smack"); ++
+ +Description
+ +A user may also want to query a contact regarding which rooms the contact is in.
+ +Usage+ +In order to get the rooms where a user is in just send +getJoinedRooms(XMPPConnection connection, String user) to the MultiUserChat +class where user is a fully qualified XMPP ID, e.g. jdoe@example.com. You will get an Iterator +of Strings as an answer where each String represents a room name.
+ +Examples
+
+In this example we can see how to get the rooms where a user is in:
+
++ +// Get the rooms where user3@host.org has joined + Iterator joinedRooms = MultiUserChat.getJoinedRooms(conn, "user3@host.org/Smack"); ++
+ +Description
+ +A user may need to discover information about a room without having to actually join the room. The server +will provide information only for public rooms.
+ +Usage+ +In order to discover information about a room just send getRoomInfo(XMPPConnection connection, String room) +to the MultiUserChat class where room is the XMPP ID of the room, e.g. +roomName@conference.myserver. You will get a RoomInfo object that contains the discovered room +information.
+ +Examples
+
+In this example we can see how to discover information about a room:
+
++ +// Discover information about the room roomName@conference.myserver + RoomInfo info = MultiUserChat.getRoomInfo(conn, "roomName@conference.myserver"); + System.out.println("Number of occupants:" + info.getOccupantsCount()); + System.out.println("Room Subject:" + info.getSubject()); ++
+ +Description
+ +A room occupant may want to start a private chat with another room occupant even though they +don't know the fully qualified XMPP ID (e.g. jdoe@example.com) of each other.
+ +Usage+ +To create a private chat with another room occupant just send createPrivateChat(String participant) +to the MultiUserChat that you used to join the room. The parameter participant is the +occupant unique room JID (e.g. 'darkcave@macbeth.shakespeare.lit/Paul'). You will receive +a regular Chat object that you can use to chat with the other room occupant.
+ +Examples
+
+In this example we can see how to start a private chat with another room occupant:
+
++ +// Start a private chat with another participant + Chat chat = muc2.createPrivateChat("myroom@conference.jabber.org/johndoe"); + chat.sendMessage("Hello there"); ++
+ +Description
+ +A common feature of multi-user chat rooms is the ability to change the subject within the room. As a +default, only users with a role of "moderator" are allowed to change the subject in a room. Although +some rooms may be configured to allow a mere participant or even a visitor to change the subject.
+ +Every time the room's subject is changed you may want to be notified of the modification. The new subject +could be used to display an in-room message.
+ +Usage+ +In order to modify the room's subject just send changeSubject(String subject) to the +MultiUserChat that you used to join the room where subject is the new room's subject. On +the other hand, if you want to be notified whenever the room's subject is modified you should add a +SubjectUpdatedListener to the MultiUserChat by sending +addSubjectUpdatedListener(SubjectUpdatedListener listener) to the MultiUserChat. +Since the SubjectUpdatedListener is an interface, it is necessary to create a class +that implements this interface.
+ +Examples
+
+In this example we can see how to change the room's subject and react whenever the room's subject is
+modified:
+
++ +// An occupant wants to be notified every time the room's subject is changed + muc3.addSubjectUpdatedListener(new SubjectUpdatedListener() { + public void subjectUpdated(String subject, String from) { + .... + } + }); + + // A room's owner changes the room's subject + muc2.changeSubject("New Subject"); ++
+ +Description
+ +There are four defined roles that an occupant can have:
++ +These roles are temporary in that they do not persist across a user's visits to the room +and can change during the course of an occupant's visit to the room.
+ +A moderator is the most powerful occupant within the context of the room, and can to some +extent manage other occupants' roles in the room. A participant has fewer privileges than a +moderator, although he or she always has the right to speak. A visitor is a more restricted +role within the context of a moderated room, since visitors are not allowed to send messages +to all occupants.
+ +Roles are granted, revoked, and maintained based on the occupant's room nickname or full +JID. Whenever an occupant's role is changed Smack will trigger specific events.
+ +Usage+ +In order to grant voice (i.e. make someone a participant) just send the message +grantVoice(String nickname) to MultiUserChat. Use revokeVoice(String nickname) +to revoke the occupant's voice (i.e. make the occupant a visitor).
+ +In order to grant moderator privileges to a participant or visitor just send the message +grantModerator(String nickname) to MultiUserChat. Use revokeModerator(String nickname) +to revoke the moderator privilege from the occupant thus making the occupant a participant.
+ +Smack allows you to listen for role modification events. If you are interested in listening role modification +events of any occupant then use the listener ParticipantStatusListener. But if you are interested +in listening for your own role modification events, use the listener UserStatusListener. Both listeners +should be added to the MultiUserChat by using +addParticipantStatusListener(ParticipantStatusListener listener) or +addUserStatusListener(UserStatusListener listener) respectively. These listeners include several notification +events but you may be interested in just a few of them. Smack provides default implementations for these listeners +avoiding you to implement all the interfaces' methods. The default implementations are DefaultUserStatusListener +and DefaultParticipantStatusListener. Below you will find the sent messages to the listeners whenever +an occupant's role has changed.
+ +These are the triggered events when the role has been upgraded: +
+Old | New | Events |
None | Visitor | -- |
Visitor | Participant | voiceGranted |
Participant | Moderator | moderatorGranted |
None | Participant | voiceGranted |
None | Moderator | voiceGranted + moderatorGranted |
Visitor | Moderator | voiceGranted + moderatorGranted |
+ +These are the triggered events when the role has been downgraded: +
+Old | New | Events |
Moderator | Participant | moderatorRevoked |
Participant | Visitor | voiceRevoked |
Visitor | None | kicked |
Moderator | Visitor | voiceRevoked + moderatorRevoked |
Moderator | None | kicked |
Participant | None | kicked |
+
+In this example we can see how to grant voice to a visitor and listen for the notification events:
+
++ +// User1 creates a room + muc = new MultiUserChat(conn1, "myroom@conference.jabber.org"); + muc.create("testbot"); + + // User1 (which is the room owner) configures the room as a moderated room + Form form = muc.getConfigurationForm(); + Form answerForm = form.createAnswerForm(); + answerForm.setAnswer("muc#roomconfig_moderatedroom", "1"); + muc.sendConfigurationForm(answerForm); + + // User2 joins the new room (as a visitor) + MultiUserChat muc2 = new MultiUserChat(conn2, "myroom@conference.jabber.org"); + muc2.join("testbot2"); + // User2 will listen for his own "voice" notification events + muc2.addUserStatusListener(new DefaultUserStatusListener() { + public void voiceGranted() { + super.voiceGranted(); + ... + } + public void voiceRevoked() { + super.voiceRevoked(); + ... + } + }); + + // User3 joins the new room (as a visitor) + MultiUserChat muc3 = new MultiUserChat(conn3, "myroom@conference.jabber.org"); + muc3.join("testbot3"); + // User3 will lister for other occupants "voice" notification events + muc3.addParticipantStatusListener(new DefaultParticipantStatusListener() { + public void voiceGranted(String participant) { + super.voiceGranted(participant); + ... + } + + public void voiceRevoked(String participant) { + super.voiceRevoked(participant); + ... + } + }); + + // The room's owner grants voice to user2 + muc.grantVoice("testbot2"); ++
+ +Description
+ +There are five defined affiliations that a user can have in relation to a room:
++ +These affiliations are semi-permanent in that they persist across a user's visits to the room and +are not affected by happenings in the room. Affiliations are granted, revoked, and maintained +based on the user's bare JID.
+ +If a user without a defined affiliation enters a room, the user's affiliation is defined as "none"; +however, this affiliation does not persist across visits.
+ +Owners and admins are by definition immune from certain actions. Specifically, an owner or admin cannot +be kicked from a room and cannot be banned from a room. An admin must first lose his or her affiliation +(i.e., have an affiliation of "none" or "member") before such actions could be performed +on them.
+ +The member affiliation provides a way for a room owner or admin to specify a "whitelist" of users +who are allowed to enter a members-only room. When a member enters a members-only room, his or her affiliation +does not change, no matter what his or her role is. The member affiliation also provides a way for users to +effectively register with an open room and thus be permanently associated with that room in some way (one +result may be that the user's nickname is reserved in the room).
+ +An outcast is a user who has been banned from a room and who is not allowed to enter the room. Whenever a +user's affiliation is changed Smack will trigger specific events.
+ +Usage+ +In order to grant membership to a room, administrator privileges or owner priveliges just send +grantMembership(String jid), grantAdmin(String jid) or grantOwnership(String jid) +to MultiUserChat respectively. Use revokeMembership(String jid), revokeAdmin(String jid) +or revokeOwnership(String jid) to revoke the membership to a room, administrator privileges or +owner priveliges respectively.
+ +In order to ban a user from the room just send the message banUser(String jid, String reason) to +MultiUserChat.
+ +Smack allows you to listen for affiliation modification events. If you are interested in listening affiliation modification +events of any user then use the listener ParticipantStatusListener. But if you are interested +in listening for your own affiliation modification events, use the listener UserStatusListener. Both listeners +should be added to the MultiUserChat by using +addParticipantStatusListener(ParticipantStatusListener listener) or +addUserStatusListener(UserStatusListener listener) respectively. These listeners include several notification +events but you may be interested in just a few of them. Smack provides default implementations for these listeners +avoiding you to implement all the interfaces' methods. The default implementations are DefaultUserStatusListener +and DefaultParticipantStatusListener. Below you will find the sent messages to the listeners whenever +a user's affiliation has changed.
+ +These are the triggered events when the affiliation has been upgraded: +
+Old | New | Events |
None | Member | membershipGranted |
Member | Admin | membershipRevoked + adminGranted |
Admin | Owner | adminRevoked + ownershipGranted |
None | Admin | adminGranted |
None | Owner | ownershipGranted |
Member | Owner | membershipRevoked + ownershipGranted |
+ +These are the triggered events when the affiliation has been downgraded: +
+Old | New | Events |
Owner | Admin | ownershipRevoked + adminGranted |
Admin | Member | adminRevoked + membershipGranted |
Member | None | membershipRevoked |
Owner | Member | ownershipRevoked + membershipGranted |
Owner | None | ownershipRevoked |
Admin | None | adminRevoked |
Anyone | Outcast | banned |
+
+In this example we can see how to grant admin privileges to a user and listen for the notification events:
+
++ + + \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/privatedata.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/privatedata.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/privatedata.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,30 @@ + + +// User1 creates a room + muc = new MultiUserChat(conn1, "myroom@conference.jabber.org"); + muc.create("testbot"); + + // User1 (which is the room owner) configures the room as a moderated room + Form form = muc.getConfigurationForm(); + Form answerForm = form.createAnswerForm(); + answerForm.setAnswer("muc#roomconfig_moderatedroom", "1"); + muc.sendConfigurationForm(answerForm); + + // User2 joins the new room (as a visitor) + MultiUserChat muc2 = new MultiUserChat(conn2, "myroom@conference.jabber.org"); + muc2.join("testbot2"); + // User2 will listen for his own admin privileges + muc2.addUserStatusListener(new DefaultUserStatusListener() { + public void membershipRevoked() { + super.membershipRevoked(); + ... + } + public void adminGranted() { + super.adminGranted(); + ... + } + }); + + // User3 joins the new room (as a visitor) + MultiUserChat muc3 = new MultiUserChat(conn3, "myroom@conference.jabber.org"); + muc3.join("testbot3"); + // User3 will lister for other users admin privileges + muc3.addParticipantStatusListener(new DefaultParticipantStatusListener() { + public void membershipRevoked(String participant) { + super.membershipRevoked(participant); + ... + } + public void adminGranted(String participant) { + super.adminGranted(participant); + ... + } + }); + + // The room's owner grants admin privileges to user2 + muc.grantAdmin("user2@jabber.org"); ++
+ +Manages private data, which is a mechanism to allow users to store arbitrary XML +data on an XMPP server. Each private data chunk is defined by a element name and +XML namespace. Example private data: + +
+<color xmlns="http://example.com/xmpp/color"> + <favorite>blue</blue> + <leastFavorite>puce</leastFavorite> +</color> +
+ +JEP related: JEP-49 + +
+This extension is used to send rosters, roster groups and roster entries from one XMPP +Entity to another. It also provides an easy way to hook up custom logic when entries +are received from other XMPP clients. +
Follow these links to learn how to send and receive roster items:
+ +JEP related: JEP-93 + ++ +Description
+ +Sometimes it is useful to send a whole roster to another user. Smack provides a +very easy way to send a complete roster to another XMPP client.
+ +Usage+ +Create an instance of RosterExchangeManager and use the #send(Roster, String) +message to send a roster to a given user. The first parameter is the roster to send and +the second parameter is the id of the user that will receive the roster entries.
+ +Example+ +In this example we can see how user1 sends his roster to user2. +
++ +// Connect to the server and log in + conn1 = new XMPPConnection(host); + conn1.login(server_user1, pass1); + + // Create a new roster exchange manager on conn1 + RosterExchangeManager rosterExchangeManager = new RosterExchangeManager(conn1); + // Send user1's roster to user2 + rosterExchangeManager.send(conn1.getRoster(), user2); ++
+ +Description
+ +It is also possible to send a roster group to another XMPP client. A roster group groups +a set of roster entries under a name.
+ +Usage+ +Create an instance of RosterExchangeManager and use the #send(RosterGroup, String) +message to send a roster group to a given user. The first parameter is the roster group to send and +the second parameter is the id of the user that will receive the roster entries.
+ +Example+ +In this example we can see how user1 sends his roster groups to user2. +
++ +// Connect to the server and log in + conn1 = new XMPPConnection(host); + conn1.login(server_user1, pass1); + + // Create a new roster exchange manager on conn1 + RosterExchangeManager rosterExchangeManager = new RosterExchangeManager(conn1); + // Send user1's RosterGroups to user2 + for (Iterator it = conn1.getRoster().getGroups(); it.hasNext(); ) + rosterExchangeManager.send((RosterGroup)it.next(), user2); ++
+ +Description
+ +Sometimes you may need to send a single roster entry to another XMPP client. Smack also lets you send +items at this granularity level.
+ +Usage+ +Create an instance of RosterExchangeManager and use the #send(RosterEntry, String) +message to send a roster entry to a given user. The first parameter is the roster entry to send and +the second parameter is the id of the user that will receive the roster entries.
+ +Example+ +In this example we can see how user1 sends a roster entry to user2. +
++ +// Connect to the server and log in + conn1 = new XMPPConnection(host); + conn1.login(server_user1, pass1); + + // Create a new roster exchange manager on conn1 + RosterExchangeManager rosterExchangeManager = new RosterExchangeManager(conn1); + // Send a roster entry (any) to user2 + rosterExchangeManager1.send((RosterEntry)conn1.getRoster().getEntries().next(), user2); ++
+ +Description
+ +Since roster items are sent between XMPP clients, it is necessary to listen to possible roster entries +receptions. Smack provides a mechanism that you can use to execute custom logic when roster entries are +received.
+ +Usage+ +
+ +In this example we can see how user1 sends a roster entry to user2 and user2 adds the received +entries to his roster. +
++ + + \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/style.css =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/style.css (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/style.css (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,57 @@ +BODY { + font-size : 100%; + background-color : #fff; +} +BODY, TD, TH { + font-family : tahoma, arial, helvetica; + font-size : 0.8em; +} +PRE, TT, CODE { + font-family : courier new, monospaced; + font-size : 1.0em; +} +A:hover { + text-decoration : none; +} +LI { + padding-bottom : 4px; +} +.header { + font-size : 1.4em; + font-weight : bold; + width : 100%; + border-bottom : 1px #ccc solid; + padding-bottom : 2px; +} +.subheader { + font-size: 1.1em; + font-weight : bold; +} +.footer { + font-size : 0.8em; + color : #999; + text-align : center; + width : 100%; + border-top : 1px #ccc solid; + padding-top : 2px; +} +.code { + border : 1px #ccc solid; + padding : 0em 1.0em 0em 1.0em; + margin : 4px 0px 4px 0px; +} +.nav, .nav A { + font-family : verdana; + font-size : 0.85em; + color : #600; + text-decoration : none; + font-weight : bold; +} +.nav { + width : 100%; + border-bottom : 1px #ccc solid; + padding : 3px 3px 5px 1px; +} +.nav A:hover { + text-decoration : underline; +} \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/extensions/time.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/extensions/time.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/extensions/time.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,22 @@ + + +// Connect to the server and log in the users + conn1 = new XMPPConnection(host); + conn1.login(server_user1, pass1); + conn2 = new XMPPConnection(host); + conn2.login(server_user2, pass2); + final Roster user2_roster = conn2.getRoster(); + + // Create a RosterExchangeManager that will help user2 to listen and accept + the entries received + RosterExchangeManager rosterExchangeManager2 = new RosterExchangeManager(conn2); + // Create a RosterExchangeListener that will iterate over the received roster entries + RosterExchangeListener rosterExchangeListener = new RosterExchangeListener() { + public void entriesReceived(String from, Iterator remoteRosterEntries) { + while (remoteRosterEntries.hasNext()) { + try { + // Get the received entry + RemoteRosterEntry remoteRosterEntry = (RemoteRosterEntry) remoteRosterEntries.next(); + // Display the remote entry on the console + System.out.println(remoteRosterEntry); + // Add the entry to the user2's roster + user2_roster.createEntry( + remoteRosterEntry.getUser(), + remoteRosterEntry.getName(), + remoteRosterEntry.getGroupArrayNames()); + } + catch (XMPPException e) { + e.printStackTrace(); + } + } + } + }; + // Add the RosterExchangeListener to the RosterExchangeManager that user2 is using + rosterExchangeManager2.addRosterListener(rosterExchangeListener); + + // Create a RosterExchangeManager that will help user1 to send his roster + RosterExchangeManager rosterExchangeManager1 = new RosterExchangeManager(conn1); + // Send user1's roster to user2 + rosterExchangeManager1.send(conn1.getRoster(), user2); ++
+ +Supports a protocol that XMPP clients use to exchange their respective local +times and time zones.
+ +JEP related: JEP-90 + +
+ +
+
+Private Data
+XHTML Messages
+Message Events
+Data Forms
+Multi User Chat
+Roster Item Exchange
+Time Exchange
+Group Chat Invitations
+Service Discovery
+File Transfer
+
+ +Provides the ability to send and receive formatted messages using XHTML. + +
Follow these links to learn how to compose, send, receive and discover support for +XHTML messages:
++ +Description
+ +The first step in order to send an XHTML message is to compose it. Smack provides a special +class that helps to build valid XHTML messages hiding any low level complexity. +For special situations, advanced users may decide not to use the helper class and generate +the XHTML by themselves. Even for these situations Smack provides a well defined entry point +in order to add the generated XHTML content to a given message.
+ ++Note: not all clients are able to view XHTML formatted messages. Therefore, +it's recommended that you include a normal body in that message that is either an +unformatted version of the text or a note that XHTML support is required +to view the message contents.
+ +Usage+ +Create an instance of XHTMLText specifying the style and language of the body. +You can add several XHTML bodies to the message but each body should be for a different language. +Once you have an XHTMLText you can start to append tags and text to it. In order to append tags there +are several messages that you can use. For each XHTML defined tag there is a message that you can send. +In order to add text you can send the message #append(String textToAppend).
+ +After you have configured the XHTML text, the last step you have to do is to add the XHTML text +to the message you want to send. If you decided to create the XHTML text by yourself, you will have to +follow this last step too. In order to add the XHTML text to the message send the message +#addBody(Message message, String body) to the XHTMLManager class where message +is the message that will receive the XHTML body and body is the string to add as an XHTML body to +the message.
+ +Example
+
+In this example we can see how to compose the following XHTML message:
+<body><p style='font-size:large'>Hey John, this is my new <span
+ style='color:green'>green</span><em>!!!!</em></p></body>
+
++ +// Create a message to send + Message msg = chat.createMessage(); + msg.setSubject("Any subject you want"); + msg.setBody("Hey John, this is my new green!!!!"); + + // Create an XHTMLText to send with the message + XHTMLText xhtmlText = new XHTMLText(null, null); + xhtmlText.appendOpenParagraphTag("font-size:large"); + xhtmlText.append("Hey John, this is my new "); + xhtmlText.appendOpenSpanTag("color:green"); + xhtmlText.append("green"); + xhtmlText.appendCloseSpanTag(); + xhtmlText.appendOpenEmTag(); + xhtmlText.append("!!!!"); + xhtmlText.appendCloseEmTag(); + xhtmlText.appendCloseParagraphTag(); + + // Add the XHTML text to the message + XHTMLManager.addBody(msg, xhtmlText.toString()); + ++
+ +Description
+ +After you have composed an XHTML message you will want to send it. Once you have added +the XHTML content to the message you want to send you are almost done. The last step is to send +the message as you do with any other message.
+ +Usage+ +An XHTML message is like any regular message, therefore to send the message you can follow +the usual steps you do in order to send a message. For example, to send a message as part +of a chat just use the message #send(Message) of Chat or you can use +the message #send(Packet) of XMPPConnection.
+ +Example+ +In this example we can see how to send a message with XHTML content as part of a chat. +
++ +// Create a message to send + Message msg = chat.createMessage(); + // Obtain the XHTML text to send from somewhere + String xhtmlBody = getXHTMLTextToSend(); + + // Add the XHTML text to the message + XHTMLManager.addBody(msg, xhtmlBody); + + // Send the message that contains the XHTML + chat.sendMessage(msg); ++
+ +Description
+ +It is also possible to obtain the XHTML content from a received message. Remember +that the specification defines that a message may contain several XHTML bodies +where each body should be for a different language.
+ +Usage+ +To get the XHTML bodies of a given message just send the message #getBodies(Message) + to the class XHTMLManager. The answer of this message will be an + Iterator with the different XHTML bodies of the message or null if none.
+ +Example+ +In this example we can see how to create a PacketListener that obtains the XHTML bodies of any received message. +
++ +// Create a listener for the chat and display any XHTML content + PacketListener packetListener = new PacketListener() { + public void processPacket(Packet packet) { + Message message = (Message) packet; + // Obtain the XHTML bodies of the message + Iterator it = XHTMLManager.getBodies(message); + if (it != null) { + // Display the bodies on the console + while (it.hasNext()) { + String body = (String) it.next(); + System.out.println(body); + } + } + }; + chat.addMessageListener(packetListener); + ++
+ +Description
+ +Before you start to send XHTML messages to a user you should discover if the user supports XHTML messages. +There are two ways to achieve the discovery, explicitly and implicitly. Explicit is when you first try +to discover if the user supports XHTML before sending any XHTML message. Implicit is when you send +XHTML messages without first discovering if the conversation partner's client supports XHTML and depenging on +the answer (normal message or XHTML message) you find out if the user supports XHTML messages or not. This +section explains how to explicitly discover for XHTML support.
+ +Usage+ +In order to discover if a remote user supports XHTML messages send #isServiceEnabled(XMPPConnection +connection, String userID) to the class XHTMLManager where connection is the connection +to use to perform the service discovery and userID is the user to check (A fully qualified xmpp ID, +e.g. jdoe@example.com). This message will return true if the specified user handles XHTML messages.
+ +Example+ +In this example we can see how to discover if a remote user supports XHTML Messages. +
++ + + Index: lams_tool_chat/lib/smack-2.2.0/documentation/gettingstarted.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/gettingstarted.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/gettingstarted.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,109 @@ + + +Message msg = chat.createMessage(); + // Include a normal body in the message + msg.setBody(getTextToSend()); + // Check if the other user supports XHTML messages + if (XHTMLManager.isServiceEnabled(connection, chat.getParticipant())) { + // Obtain the XHTML text to send from somewhere + String xhtmlBody = getXHTMLTextToSend(); + + // Include an XHTML body in the message + XHTMLManager.addBody(msg, xhtmlBody); + } + + // Send the message + chat.sendMessage(msg); ++
+This document will introduce you to the Smack API and provide an overview of +important classes and concepts. +
+ ++Requirements +
+ +The only requirement for Smack is JDK 1.2 or later +1. +An XML parser is embedded in the smack.jar file and no other third party +libraries are required.+ +1 JDK 1.2 and 1.3 users that wish to use SSL connections must have the +JSSE library in their classpath. + +
+Establishing a Connection +
+ +The XMPPConnection class is used to create a connection to an +XMPP server. To create an SSL connection, use the SSLXMPPConnection class. +Below are code examples for making a connection:+ +
+// Create a connection to the jabber.org server. +XMPPConnection conn1 = new XMPPConnection("jabber.org"); + +// Create a connection to the jabber.org server on a specific port. +XMPPConnection conn2 = new XMPPConnection("jabber.org", 5222); + +// Create an SSL connection to jabber.org. +XMPPConnection connection = new SSLXMPPConnection("jabber.org"); +
Once you've created a connection, you should login using a username and password +with the XMPPConnection.login(String username, String password) method. +Once you've logged in, you can being chatting with other users by creating +new Chat or GroupChat objects. + +
+Working with the Roster +
+The roster lets you keep track of the availability (presence) of other users. Users +can be organized into groups such as "Friends" and "Co-workers", and then you +discover whether each user is online or offline.+ +Retrieve the roster using the XMPPConnection.getRoster() method. The roster +class allows you to find all the roster entries, the groups they belong to, and the +current presence status of each entry. + +
+Reading and Writing Packets +
+ +Each message to the XMPP server from a client is called a packet and is +sent as XML. The org.jivesoftware.smack.packet package contains +classes that encapsulate the three different basic packet types allowed by +XMPP (message, presence, and IQ). Classes such as Chat and GroupChat +provide higher-level constructs that manage creating and sending packets +automatically, but you can also create and send packets directly. Below +is a code example for changing your presence to let people know you're unavailable +and "out fishing":+ +
+// Create a new presence. Pass in false to indicate we're unavailable. +Presence presence = new Presence(Presence.Type.UNAVAILABLE); +presence.setStatus("Gone fishing"); +// Send the packet (assume we have a XMPPConnection instance called "con"). +con.sendPacket(presence); +
+ +Smack provides two ways to read incoming packets: PacketListener, and +PacketCollector. Both use PacketFilter instances to determine +which packets should be processed. A packet listener is used for event style programming, +while a packet collector has a result queue of packets that you can do +polling and blocking operations on. So, a packet listener is useful when +you want to take some action whenever a packet happens to come in, while a +packet collector is useful when you want to wait for a specific packet +to arrive. Packet collectors and listeners can be created using an +XMPPConnection instance. + + +
+ + + \ No newline at end of file Index: lams_tool_chat/lib/smack-2.2.0/documentation/images/debugwindow.gif =================================================================== diff -u Binary files differ Index: lams_tool_chat/lib/smack-2.2.0/documentation/images/enhanceddebugger.png =================================================================== diff -u Binary files differ Index: lams_tool_chat/lib/smack-2.2.0/documentation/images/roster.png =================================================================== diff -u Binary files differ Index: lams_tool_chat/lib/smack-2.2.0/documentation/images/smacklogo.png =================================================================== diff -u Binary files differ Index: lams_tool_chat/lib/smack-2.2.0/documentation/index.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/index.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/index.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,37 @@ + + +
+![]() | +Smack Documentation + |
+Contents: +
+ ++
+Sending messages back and forth is at the core of instant messaging. Two classes +aid in sending and receiving messages: +
+Chat +
+ +A chat creates a new thread of messages (using a thread ID) between two users. The +following code snippet demonstrates how to create a new Chat with a user and then send +them a text message:+ +
+// Assume we've created an XMPPConnection name "connection". +Chat newChat = connection.createChat("jsmith@jivesoftware.com"); +newChat.sendMessage("Howdy!"); +
+ +The Chat.sendMessage(String) method is a convenience method that creates a Message +object, sets the body using the String parameter, then sends the message. In the case +that you wish to set additional values on a Message before sending it, use the +Chat.createMessage() and Chat.sendMessage(Message) methods, as in the +following code snippet:
+ +
+// Assume we've created an XMPPConnection name "connection". +Chat newChat = connection.createChat("jsmith@jivesoftware.com"); +Message newMessage = newChat.createMessage(); +newMessage.setBody("Howdy!"); +message.setProperty("favoriteColor", "red"); +newChat.sendMessage(newMessage); +
+ +The Chat object allows you to easily listen for replies from the other chat participant. +The following code snippet is a parrot-bot -- it echoes back everything the other user types.
+ +
+// Assume we've created an XMPPConnection name "connection". +Chat newChat = connection.createChat("jsmith@jivesoftware.com"); +newMessage.setBody("Hi, I'm an annoying parrot-bot! Type something back to me."); +while (true) { + // Wait for the next message the user types to us. + Message message = newChat.nextMessage(); + // Send back the same text the other user sent us. + newChat.sendMessage(message.getBody()); +} +
+ +The code above uses the Chat.nextMessage() method to get the next message, which +will wait indefinitely until another message comes in. There are other methods to wait +a specific amount of time for a new message, or you can add a listener that will be notified +every time a new message arrives. + +
+GroupChat +
+ +A group chat connects to a chat room on a server and allows you to send and receive messages +from a group of people. Before you can send or receive messages, you must join the room using +a nickname. The following code snippet connects to a chat room and sends a +message.+ +
+// Assume we've created an XMPPConnection name "connection". +GroupChat newGroupChat = connection.createGroupChat("test@jivesoftware.com"); +// Join the group chat using the nickname "jsmith". +newGroupChat.join("jsmith"); +// Send a message to all the other people in the chat room. +newGroupChat.sendMessage("Howdy!"); +
+ +In general, sending and receiving messages in a group chat works very similarly to +the Chat class. Method are also provided to get the list of the other +users in the room.
+
+
+
+
+ +Smack is a library for communicating with XMPP servers to perform +instant messaging and chat.
+ +
+Smack Key Advantages +
+ ++XMPPConnection connection = new XMPPConnection("jabber.org"); +connection.login("mtucker", "password"); +connection.createChat("jsmith@jivesoftware.com").sendMessage("Howdy!"); +
+About XMPP +
+ +XMPP (eXtensible Messaging and Presence Protocol) is an open, XML based protocol +making it's way through the IETF approval process under the guidance of the +Jabber Software Foundation (http://www.jabber.org). + ++How To Use This Documentation +
+ +This documentation assumes that you're already familiar with the main features of XMPP +instant messaging. It's also highly recommended that you open the Javadoc API guide and +use that as a reference while reading through this documentation. + ++ +Smack provides a flexible framework for processing incoming packets using two constructs: +
+ +The org.jivesoftware.smack.filter.PacketFilter interface determines which +specific packets will be delivered to a PacketCollector or PacketListener. +Many pre-defined filters can be found in the org.jivesoftware.smack.filter package. + +
+The following code snippet demonstrates registering both a packet collector and a packet +listener:
+ +
+// Create a packet filter to listen for new messages from a particular +// user. We use an AndFilter to combine two other filters. +PacketFilter filter = new AndFilter(new PacketTypeFilter(Message.class), + new FromContainsFilter("mary@jivesoftware.com")); +// Assume we've created an XMPPConnection name "connection". + +// First, register a packet collector using the filter we created. +PacketCollector myCollector = connection.createPacketCollector(filter); +// Normally, you'd do something with the collector, like wait for new packets. + +// Next, create a packet listener. We use an anonymous inner class for brevity. +PacketListener myListener = new PacketListener() { + public void processPacket(Packet packet) { + // Do something with the incoming packet here. + } + }; +// Register the listener. +connection.addPacketListener(myListener, filter); +
+ +
+Standard Packet Filters +
+ +A rich set of packet filters are included with Smack, or you can create your own filters by coding +to the PacketFilter interface. The default set of filters includes: ++Smack provides an easy mechanism for attaching arbitrary properties to packets. Each property +has a String name, and a value that is a Java primitive (int, long, float, double, boolean) or +any Serializable object (a Java object is Serializable when it implements the Serializable +interface). +
+ ++Using the API +
+ ++All major objects have property support, such as Message objects. The following code +demonstrates how to set properties: +
+ ++Message message = chat.createMessage(); +// Add a Color object as a property. +message.setProperty("favoriteColor", new Color(0, 0, 255)); +// Add an int as a property. +message.setProperty("favoriteNumber", 4); +chat.sendMessage(message); +
+Getting those same properties would use the following code: +
+ ++Message message = chat.nextMessage(); +// Get a Color object property. +Color favoriteColor = (Color)message.getProperty("favoriteColor"); +// Get an int property. Note that properties are always returned as +// Objects, so we must cast the value to an Integer, then convert +// it to an int. +int favoriteNumber = ((Integer)message.getProperty("favoriteNumber")).intValue(); +
+Objects as Properties +
+ ++Using objects as property values is a very powerful and easy way to exchange data. However, +you should keep the following in mind: +
+ ++XML Format +
+ ++The current XML format used to send property data is not a standard, so will likely not be +recognized by clients not using Smack. The XML looks like the following (comments added for +clarity): +
+ ++<!-- All properties are in a x block. --> +<properties xmlns="http://www.jivesoftware.com/xmlns/xmpp/properties"> + <!-- First, a property named "prop1" that's an integer. --> + <property> + <name>prop1</name> + <value type="integer">123</value> + <property> + <!-- Next, a Java object that's been serialized and then converted + from binary data to base-64 encoded text. --> + <property> + <name>blah2</name> + <value type="java-object">adf612fna9nab</value> + <property> +</properties> +
+The currently supported types are: integer, long, float, +double, boolean, string, and java-object. +
+ + + + + Index: lams_tool_chat/lib/smack-2.2.0/documentation/providers.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/documentation/providers.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/documentation/providers.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,121 @@ + + ++ +The Smack provider architecture is a system for plugging in +custom XML parsing of packet extensions and IQ packets. The +standard Smack Extensions +are built using the provider architecture. Two types of +providers exist:
IQProvider
+ +By default, Smack only knows how to process IQ packets with sub-packets that +are in a few namespaces such as:+ <?xml version="1.0"?> + <smackProviders> + <iqProvider> + <elementName>query</elementName> + <namespace>jabber:iq:time</namespace> + <className>org.jivesoftware.smack.packet.Time</className> + </iqProvider> + </smackProviders>+ +Each IQ provider is associated with an element name and a namespace. In the +example above, the element name is query and the namespace is +abber:iq:time. If multiple provider entries attempt to register to +handle the same namespace, the first entry loaded from the classpath will +take precedence.
+ +The IQ provider class can either implement the IQProvider +interface, or extend the IQ class. In the former case, each IQProvider is +responsible for parsing the raw XML stream to create an IQ instance. In +the latter case, bean introspection is used to try to automatically set +properties of the IQ instance using the values found in the IQ packet XML. +For example, an XMPP time packet resembles the following: + +
+<iq type='result' to='joe@example.com' from='mary@example.com' id='time_1'> + <query xmlns='jabber:iq:time'> + <utc>20020910T17:58:35</utc> + <tz>MDT</tz> + <display>Tue Sep 10 12:58:35 2002</display> + </query> +</iq>+ +In order for this packet to be automatically mapped to the Time object listed in the +providers file above, it must have the methods setUtc(String), setTz(String), and +setDisplay(String). The introspection service will automatically try to convert the String +value from the XML into a boolean, int, long, float, double, or Class depending on the +type the IQ instance expects.
+ +
PacketExtensionProvider
+ +Packet extension providers provide a pluggable system for +packet extensions, which are child elements in a custom namespace +of IQ, message and presence packets. +Each extension provider is registered with an element name and namespace +in the smack.providers file as in the following example: + ++<?xml version="1.0"?> +<smackProviders> + <extensionProvider> + <elementName>x</elementName> + <namespace>jabber:iq:event</namespace> + <className>org.jivesoftware.smack.packet.MessageEvent</className> + </extensionProvider> +</smackProviders>+ +If multiple provider entries attempt to register to handle the same element +name and namespace, the first entry loaded from the classpath will take +precedence.
+ +Whenever a packet extension is found in a packet, parsing will +be passed to the correct provider. Each provider can either implement the +PacketExtensionProvider interface or be a standard Java Bean. In the +former case, each extension provider is responsible for parsing the raw +XML stream to contruct an object. In the latter case, bean introspection +is used to try to automatically set the properties of the class using +the values in the packet extension sub-element.
+
+When an extension provider is not registered for an element name and
+namespace combination, Smack will store all top-level elements of the
+sub-packet in DefaultPacketExtension object and then attach it to the packet.
+
+
+
+
+
+ +The roster lets you keep track of the availability ("presence") of other users. +A roster also allows you to organize users into groups such as "Friends" and +"Co-workers". Other IM systems refer to the roster as the buddy list, contact list, +etc.
+ +A Roster instance is obtained using the XMPPConnection.getRoster() +method, but only after successfully logging into a server. + +
Roster Entries
+ ++Every user in a roster is represented by a RosterEntry, which consists of:
+Roster roster = con.getRoster(); +for (Iterator i=roster.getEntries(); i.hasNext(); ) { + System.out.println(i.next()); +} ++ +Methods also exist to get individual entries, the list of unfiled entries, or to get one or +all roster groups. + +
Presence
+ +Every entry in the roster has presence associated with it. The +Roster.getPresence(String user) method will return a Presence object with +the user's presence or null if the user is not online or you are not +subscribed to the user's presence. Note: typically, presence +subscription is always tied to the user being on the roster, but this is not +true in all cases.
+ +A user either has a presence of online or offline. When a user is online, their +presence may contain extended information such as what they are currently doing, whether +they wish to be disturbed, etc. See the Presence class for further details.
+ +Listening for Roster and Presence Changes
+ +The typical use of the roster class is to display a tree view of groups and entries +along with the current presence value of each entry. As an example, see the image showing +a Roster in the Exodus XMPP client to the right.
+ +The presence information will likely
+change often, and it's also possible for the roster entries to change or be deleted.
+To listen for changing roster and presence data, a RosterListener should be used.
+The following code snippet registers a RosterListener with the Roster that prints
+any presence changes in the roster to standard out. A normal client would use
+similar code to update the roster UI with the changing information.
+
+
+
+
+final Roster roster = con.getRoster(); +roster.addRosterListener(new RosterListener() { + public void rosterModified() { + // Ignore event for this example. + } + + public void presenceChanged(String user) { + // If the presence is unavailable then "null" will be printed, + // which is fine for this example. + System.out.println("Presence changed: " + roster.getPresence(user)); + } +}); ++ +
Adding Entries to the Roster
+ +Rosters and presence use a permissions-based model where users must give permission before +they are added to someone else's roster. This protects a user's privacy by +making sure that only approved users are able to view their presence information. +Therefore, when you add a new roster entry it will be in a pending state until +the other user accepts your request.
+ +If another user requests a presence subscription so they can add you to their roster, +you must accept or reject that request. Smack handles presence subscription requests +in one of three ways:
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+org.jivesoftware.* | +
---|
+ +
org.jivesoftware.smack.Roster | +||
---|---|---|
+public static final int |
+SUBSCRIPTION_ACCEPT_ALL |
+0 |
+
+public static final int |
+SUBSCRIPTION_MANUAL |
+2 |
+
+public static final int |
+SUBSCRIPTION_REJECT_ALL |
+1 |
+
+ +
+ +
org.jivesoftware.smack.packet.Packet | +||
---|---|---|
+public static final String |
+ID_NOT_AVAILABLE |
+"ID_NOT_AVAILABLE" |
+
+ +
+ +
org.jivesoftware.smackx.Form | +||
---|---|---|
+public static final String |
+TYPE_CANCEL |
+"cancel" |
+
+public static final String |
+TYPE_FORM |
+"form" |
+
+public static final String |
+TYPE_RESULT |
+"result" |
+
+public static final String |
+TYPE_SUBMIT |
+"submit" |
+
+ +
+ +
org.jivesoftware.smackx.FormField | +||
---|---|---|
+public static final String |
+TYPE_BOOLEAN |
+"boolean" |
+
+public static final String |
+TYPE_FIXED |
+"fixed" |
+
+public static final String |
+TYPE_HIDDEN |
+"hidden" |
+
+public static final String |
+TYPE_JID_MULTI |
+"jid-multi" |
+
+public static final String |
+TYPE_JID_SINGLE |
+"jid-single" |
+
+public static final String |
+TYPE_LIST_MULTI |
+"list-multi" |
+
+public static final String |
+TYPE_LIST_SINGLE |
+"list-single" |
+
+public static final String |
+TYPE_TEXT_MULTI |
+"text-multi" |
+
+public static final String |
+TYPE_TEXT_PRIVATE |
+"text-private" |
+
+public static final String |
+TYPE_TEXT_SINGLE |
+"text-single" |
+
+ +
+ +
org.jivesoftware.smackx.GroupChatInvitation | +||
---|---|---|
+public static final String |
+ELEMENT_NAME |
+"x" |
+
+public static final String |
+NAMESPACE |
+"jabber:x:conference" |
+
+ +
+ +
org.jivesoftware.smackx.filetransfer.FileTransferNegotiator | +||
---|---|---|
+public static final String |
+BYTE_STREAM |
+"http://jabber.org/protocol/bytestreams" |
+
+public static final String |
+INBAND_BYTE_STREAM |
+"http://jabber.org/protocol/ibb" |
+
+protected static final String |
+STREAM_DATA_FIELD_NAME |
+"stream-method" |
+
+ +
+ +
org.jivesoftware.smackx.filetransfer.IBBTransferNegotiator | +||
---|---|---|
+public static final int |
+DEFAULT_BLOCK_SIZE |
+4096 |
+
+protected static final String |
+NAMESPACE |
+"http://jabber.org/protocol/ibb" |
+
+ +
+ +
org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator | +||
---|---|---|
+protected static final String |
+NAMESPACE |
+"http://jabber.org/protocol/bytestreams" |
+
+ +
+ +
org.jivesoftware.smackx.packet.DiscoverItems.Item | +||
---|---|---|
+public static final String |
+REMOVE_ACTION |
+"remove" |
+
+public static final String |
+UPDATE_ACTION |
+"update" |
+
+ +
+ +
org.jivesoftware.smackx.packet.IBBExtensions | +||
---|---|---|
+public static final String |
+NAMESPACE |
+"http://jabber.org/protocol/ibb" |
+
+ +
+ +
org.jivesoftware.smackx.packet.IBBExtensions.Close | +||
---|---|---|
+public static final String |
+ELEMENT_NAME |
+"close" |
+
+ +
+ +
org.jivesoftware.smackx.packet.IBBExtensions.Data | +||
---|---|---|
+public static final String |
+ELEMENT_NAME |
+"data" |
+
+ +
+ +
org.jivesoftware.smackx.packet.IBBExtensions.Open | +||
---|---|---|
+public static final String |
+ELEMENT_NAME |
+"open" |
+
+ +
+ +
org.jivesoftware.smackx.packet.MessageEvent | +||
---|---|---|
+public static final String |
+CANCELLED |
+"cancelled" |
+
+public static final String |
+COMPOSING |
+"composing" |
+
+public static final String |
+DELIVERED |
+"delivered" |
+
+public static final String |
+DISPLAYED |
+"displayed" |
+
+public static final String |
+OFFLINE |
+"offline" |
+
+ +
+ +
org.jivesoftware.smackx.packet.MultipleAddresses | +||
---|---|---|
+public static final String |
+BCC |
+"bcc" |
+
+public static final String |
+CC |
+"cc" |
+
+public static final String |
+NO_REPLY |
+"noreply" |
+
+public static final String |
+REPLY_ROOM |
+"replyroom" |
+
+public static final String |
+REPLY_TO |
+"replyto" |
+
+public static final String |
+TO |
+"to" |
+
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+ +++The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+ +++Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
+
+- Interfaces (italic)
- Classes
- Enums
- Exceptions
- Errors
- Annotation Types
+ ++ ++Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.- Class inheritance diagram
- Direct Subclasses
- All Known Subinterfaces
- All Known Implementing Classes
- Class/interface declaration
- Class/interface description +
+
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary +
+
- Field Detail
- Constructor Detail
- Method Detail
+ ++ ++Each annotation type has its own separate page with the following sections:
+
+- Annotation Type declaration
- Annotation Type description
- Required Element Summary
- Optional Element Summary
- Element Detail
+ +++Each enum has its own separate page with the following sections:
+
+- Enum declaration
- Enum description
- Enum Constant Summary
- Enum Constant Detail
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with+java.lang.Object
. The interfaces do not inherit fromjava.lang.Object
.+
+- When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
- When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.+
+
+
+
+
+This help file applies to API documentation generated using the standard doclet.
+
+
+
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
Column
+PacketInterceptor
that will be invoked every time a new presence
+ is going to be sent by this MultiUserChat to the server.
+Row
.
+Affiliate
with the room administrators.
+MultipleAddresses.Address
+ that were the secondary recipients of the packet.
+FileTransfer.getStatus()
returns that there was an FileTransfer.Status.ERROR
+ during the transfer, the type of error can be retrieved through this
+ method.
+Affiliate
with the room members.
+Occupant
with the room moderators.
+MultipleRecipientInfo
contained in the specified packet or
+ null if none was found.
+DiscoverItems.Item
+ defined in the node.
+Affiliate
with the room outcasts.
+Affiliate
with the room owners.
+Occupant
with the room participants.
+ReportedData
+MultipleAddresses.Address
+ that were the primary recipients of the packet.
+FileTransferManager.createIncomingFileTransfer(FileTransferRequest)
+ method is invoked.GroupChat.join(String)
method.
+MultiUserChat.join(String)
method).
+MultipleAddresses
packets.OfflineMessageManager
.PacketCollector
and PacketListener
instances to filter for packets with particular attributes.PacketInterceptor
that was being invoked every time a new presence
+ was being sent by this MultiUserChat to the server.
+
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.AccountManager +
public class AccountManager
+Allows creation and management of accounts on an XMPP server. +
+ +
+
XMPPConnection.getAccountManager()
+Constructor Summary | +|
---|---|
AccountManager(XMPPConnection connection)
+
++ Creates a new AccountManager instance. |
+
+Method Summary | +|
---|---|
+ void |
+changePassword(String newPassword)
+
++ Changes the password of the currently logged-in account. |
+
+ void |
+createAccount(String username,
+ String password)
+
++ Creates a new account using the specified username and password. |
+
+ void |
+createAccount(String username,
+ String password,
+ Map attributes)
+
++ Creates a new account using the specified username, password and account attributes. |
+
+ void |
+deleteAccount()
+
++ Deletes the currently logged-in account from the server. |
+
+ String |
+getAccountAttribute(String name)
+
++ Returns the value of a given account attribute or null if the account + attribute wasn't found. |
+
+ Iterator |
+getAccountAttributes()
+
++ Returns an Iterator for the (String) names of the required account attributes. |
+
+ String |
+getAccountInstructions()
+
++ Returns the instructions for creating a new account, or null if there + are no instructions. |
+
+ boolean |
+supportsAccountCreation()
+
++ Returns true if the server supports creating new accounts. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public AccountManager(XMPPConnection connection)+
+
connection
- a connection to a XMPP server.+Method Detail | +
---|
+public boolean supportsAccountCreation()+
+
+public Iterator getAccountAttributes()+
+ + Typically, servers require no attributes when creating new accounts, or just + the user's email address. +
+
+public String getAccountAttribute(String name)+
+
name
- the name of the account attribute to return its value.
++public String getAccountInstructions()+
+
+public void createAccount(String username, + String password) + throws XMPPException+
+
username
- the username.password
- the password.
+XMPPException
- if an error occurs creating the account.+public void createAccount(String username, + String password, + Map attributes) + throws XMPPException+
+
username
- the username.password
- the password.attributes
- the account attributes.
+XMPPException
- if an error occurs creating the account.getAccountAttributes()
+public void changePassword(String newPassword) + throws XMPPException+
+
IllegalStateException
- if not currently logged-in to the server.
+XMPPException
- if an error occurs when changing the password.+public void deleteAccount() + throws XMPPException+
+
IllegalStateException
- if not currently logged-in to the server.
+XMPPException
- if an error occurs when deleting the account.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.Chat +
public class Chat
+A chat is a series of messages sent between two users. Each chat has a unique + thread ID, which is used to track which messages are part of a particular + conversation. Some messages are sent without a thread ID, and some clients + don't send thread IDs at all. Therefore, if a message without a thread ID + arrives it is routed to the most recently created Chat with the message + sender. +
+ +
+
XMPPConnection.createChat(String)
+Constructor Summary | +|
---|---|
Chat(XMPPConnection connection,
+ String participant)
+
++ Creates a new chat with the specified user. |
+|
Chat(XMPPConnection connection,
+ String participant,
+ String threadID)
+
++ Creates a new chat with the specified user and thread ID. |
+
+Method Summary | +|
---|---|
+ void |
+addMessageListener(PacketListener listener)
+
++ Adds a packet listener that will be notified of any new messages in the + chat. |
+
+ Message |
+createMessage()
+
++ Creates a new Message to the chat participant. |
+
+ void |
+finalize()
+
++ |
+
+ String |
+getParticipant()
+
++ Returns the name of the user the chat is with. |
+
+ String |
+getThreadID()
+
++ Returns the thread id associated with this chat, which corresponds to the + thread field of XMPP messages. |
+
+ Message |
+nextMessage()
+
++ Returns the next available message in the chat. |
+
+ Message |
+nextMessage(long timeout)
+
++ Returns the next available message in the chat. |
+
+ Message |
+pollMessage()
+
++ Polls for and returns the next message, or null if there isn't + a message immediately available. |
+
+ void |
+sendMessage(Message message)
+
++ Sends a message to the other chat participant. |
+
+ void |
+sendMessage(String text)
+
++ Sends the specified text as a message to the other chat participant. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Chat(XMPPConnection connection, + String participant)+
+
connection
- the connection the chat will use.participant
- the user to chat with.+public Chat(XMPPConnection connection, + String participant, + String threadID)+
+
connection
- the connection the chat will use.participant
- the user to chat with.threadID
- the thread ID to use.+Method Detail | +
---|
+public String getThreadID()+
+
+public String getParticipant()+
+
+public void sendMessage(String text) + throws XMPPException+
+ Message message = chat.createMessage(); + message.setBody(messageText); + chat.sendMessage(message); ++
+
text
- the text to send.
+XMPPException
- if sending the message fails.+public Message createMessage()+
+
sendMessage(Message)
+public void sendMessage(Message message) + throws XMPPException+
createMessage
+ method.
++
message
- the message to send.
+XMPPException
- if an error occurs sending the message.+public Message pollMessage()+
nextMessage()
method since it's non-blocking.
+ In other words, the method call will always return immediately, whereas the
+ nextMessage method will return only when a message is available (or after
+ a specific timeout).
++
+public Message nextMessage()+
+
+public Message nextMessage(long timeout)+
+
timeout
- the maximum amount of time to wait for the next message.
++public void addMessageListener(PacketListener listener)+
+
listener
- a packet listener.+public void finalize() + throws Throwable+
finalize
in class Object
Throwable
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.ConnectionConfiguration +
public class ConnectionConfiguration
+Configuration to use while establishing the connection to the server. It is possible to + configure the path to the trustore file that keeps the trusted CA root certificates and + enable or disable all or some of the checkings done while verifying server certificates.
+ + It is also possible to configure it TLs, SASL or compression are going to be used or not. +
+ +
+
+Constructor Summary | +|
---|---|
ConnectionConfiguration(String host,
+ int port)
+
++ |
+|
ConnectionConfiguration(String host,
+ int port,
+ String serviceName)
+
++ |
+
+Method Summary | +|
---|---|
+protected Object |
+clone()
+
++ |
+
+ String |
+getHost()
+
++ Returns the host to use when establishing the connection. |
+
+ int |
+getPort()
+
++ Returns the port to use when establishing the connection. |
+
+ String |
+getServiceName()
+
++ Returns the server name of the target server. |
+
+ String |
+getTruststorePassword()
+
++ Returns the password to use to access the truststore file. |
+
+ String |
+getTruststorePath()
+
++ Retuns the path to the truststore file. |
+
+ String |
+getTruststoreType()
+
++ |
+
+ boolean |
+isCompressionEnabled()
+
++ Returns true if the connection is going to use stream compression. |
+
+ boolean |
+isDebuggerEnabled()
+
++ Returns true if the new connection about to be establish is going to be debugged. |
+
+ boolean |
+isExpiredCertificatesCheckEnabled()
+
++ Returns true if certificates presented by the server are going to be checked for their + validity. |
+
+ boolean |
+isNotMatchingDomainCheckEnabled()
+
++ Returns true if certificates presented by the server are going to be checked for their + domain. |
+
+ boolean |
+isSASLAuthenticationEnabled()
+
++ Returns true if the client is going to use SASL authentication when logging into the + server. |
+
+ boolean |
+isSelfSignedCertificateEnabled()
+
++ Returns true if self-signed certificates are going to be accepted. |
+
+ boolean |
+isTLSEnabled()
+
++ Returns true if the client is going to try to secure the connection using TLS after + the connection has been established. |
+
+ boolean |
+isVerifyChainEnabled()
+
++ Returns true if the whole chain of certificates presented by the server are going to + be checked. |
+
+ boolean |
+isVerifyRootCAEnabled()
+
++ Returns true if root CA checking is going to be done. |
+
+ void |
+setCompressionEnabled(boolean compressionEnabled)
+
++ Sets if the connection is going to use stream compression. |
+
+ void |
+setDebuggerEnabled(boolean debuggerEnabled)
+
++ Sets if the new connection about to be establish is going to be debugged. |
+
+ void |
+setExpiredCertificatesCheckEnabled(boolean expiredCertificatesCheckEnabled)
+
++ Sets if certificates presented by the server are going to be checked for their + validity. |
+
+ void |
+setNotMatchingDomainCheckEnabled(boolean notMatchingDomainCheckEnabled)
+
++ Sets if certificates presented by the server are going to be checked for their + domain. |
+
+ void |
+setSASLAuthenticationEnabled(boolean saslAuthenticationEnabled)
+
++ Sets if the client is going to use SASL authentication when logging into the + server. |
+
+ void |
+setSelfSignedCertificateEnabled(boolean selfSignedCertificateEnabled)
+
++ Sets if self-signed certificates are going to be accepted. |
+
+ void |
+setTLSEnabled(boolean tlsEnabled)
+
++ Sets if the client is going to try to secure the connection using TLS after + the connection has been established. |
+
+ void |
+setTruststorePassword(String truststorePassword)
+
++ Sets the password to use to access the truststore file. |
+
+ void |
+setTruststorePath(String truststorePath)
+
++ Sets the path to the truststore file. |
+
+ void |
+setTruststoreType(String truststoreType)
+
++ |
+
+ void |
+setVerifyChainEnabled(boolean verifyChainEnabled)
+
++ Sets if the whole chain of certificates presented by the server are going to + be checked. |
+
+ void |
+setVerifyRootCAEnabled(boolean verifyRootCAEnabled)
+
++ Sets if root CA checking is going to be done. |
+
Methods inherited from class java.lang.Object | +
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ConnectionConfiguration(String host, + int port, + String serviceName)+
+public ConnectionConfiguration(String host, + int port)+
+Method Detail | +
---|
+public String getServiceName()+
+
+public String getHost()+
+
+public int getPort()+
+
+public boolean isTLSEnabled()+
+
+public void setTLSEnabled(boolean tlsEnabled)+
+
tlsEnabled
- if the client is going to try to secure the connection using TLS after
+ the connection has been established.+public String getTruststorePath()+
+
+public void setTruststorePath(String truststorePath)+
+
truststorePath
- the path to the truststore file.+public String getTruststoreType()+
+public void setTruststoreType(String truststoreType)+
+public String getTruststorePassword()+
+
+public void setTruststorePassword(String truststorePassword)+
+
truststorePassword
- the password to use to access the truststore file.+public boolean isVerifyChainEnabled()+
+
+public void setVerifyChainEnabled(boolean verifyChainEnabled)+
+
verifyChainEnabled
- if the whole chaing of certificates presented by the server
+ are going to be checked.+public boolean isVerifyRootCAEnabled()+
+
+public void setVerifyRootCAEnabled(boolean verifyRootCAEnabled)+
+
verifyRootCAEnabled
- if root CA checking is going to be done.+public boolean isSelfSignedCertificateEnabled()+
+
+public void setSelfSignedCertificateEnabled(boolean selfSignedCertificateEnabled)+
+
selfSignedCertificateEnabled
- if self-signed certificates are going to be accepted.+public boolean isExpiredCertificatesCheckEnabled()+
+
+public void setExpiredCertificatesCheckEnabled(boolean expiredCertificatesCheckEnabled)+
+
expiredCertificatesCheckEnabled
- if certificates presented by the server are going
+ to be checked for their validity.+public boolean isNotMatchingDomainCheckEnabled()+
+
+public void setNotMatchingDomainCheckEnabled(boolean notMatchingDomainCheckEnabled)+
+
notMatchingDomainCheckEnabled
- if certificates presented by the server are going
+ to be checked for their domain.+public boolean isCompressionEnabled()+
+
+public void setCompressionEnabled(boolean compressionEnabled)+
+
compressionEnabled
- if the connection is going to use stream compression.+public boolean isSASLAuthenticationEnabled()+
+
+public void setSASLAuthenticationEnabled(boolean saslAuthenticationEnabled)+
+
saslAuthenticationEnabled
- if the client is going to use SASL authentication when
+ logging into the server.+public boolean isDebuggerEnabled()+
XMPPConnection.DEBUG_ENABLED
is used.
++
+public void setDebuggerEnabled(boolean debuggerEnabled)+
XMPPConnection.DEBUG_ENABLED
is used.
++
debuggerEnabled
- if the new connection about to be establish is going to be debugged.+protected Object clone() + throws CloneNotSupportedException+
clone
in class Object
CloneNotSupportedException
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface ConnectionEstablishedListener
+Interface that allows for implementing classes to listen for connection established + events. Listeners are registered with the XMPPConnection class. +
+ +
+
XMPPConnection.addConnectionListener(org.jivesoftware.smack.ConnectionListener)
,
+XMPPConnection.removeConnectionListener(org.jivesoftware.smack.ConnectionListener)
+Method Summary | +|
---|---|
+ void |
+connectionEstablished(XMPPConnection connection)
+
++ Notification that a new connection has been established. |
+
+Method Detail | +
---|
+void connectionEstablished(XMPPConnection connection)+
+
connection
- the new established connection
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface ConnectionListener
+Interface that allows for implementing classes to listen for connection closing + events. Listeners are registered with XMPPConnection objects. +
+ +
+
XMPPConnection.addConnectionListener(org.jivesoftware.smack.ConnectionListener)
,
+XMPPConnection.removeConnectionListener(org.jivesoftware.smack.ConnectionListener)
+Method Summary | +|
---|---|
+ void |
+connectionClosed()
+
++ Notification that the connection was closed normally. |
+
+ void |
+connectionClosedOnError(Exception e)
+
++ Notification that the connection was closed due to an exception. |
+
+Method Detail | +
---|
+void connectionClosed()+
+
+void connectionClosedOnError(Exception e)+
+
e
- the exception.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.XMPPConnection +
org.jivesoftware.smack.GoogleTalkConnection +
public class GoogleTalkConnection
+Convenience class to make it easier to connect to the Google Talk IM service.
+ You can also use XMPPConnection
to connect to Google Talk by specifying
+ the server name, service name, and port.
+ + After creating the connection, log in in using a Gmail username and password. + For the Gmail address "jsmith@gmail.com", the username is "jsmith". +
+ +
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.XMPPConnection | +
---|
DEBUG_ENABLED |
+
+Constructor Summary | +|
---|---|
GoogleTalkConnection()
+
++ |
+
+Method Summary | +
---|
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public GoogleTalkConnection() + throws XMPPException+
XMPPException
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.GroupChat +
public class GroupChat
+A GroupChat is a conversation that takes place among many users in a virtual + room. When joining a group chat, you specify a nickname, which is the identity + that other chat room users see. +
+ +
+
XMPPConnection.createGroupChat(String)
+Constructor Summary | +|
---|---|
GroupChat(XMPPConnection connection,
+ String room)
+
++ Creates a new group chat with the specified connection and room name. |
+
+Method Summary | +|
---|---|
+ void |
+addMessageListener(PacketListener listener)
+
++ Adds a packet listener that will be notified of any new messages in the + group chat. |
+
+ void |
+addParticipantListener(PacketListener listener)
+
++ Adds a packet listener that will be notified of any new Presence packets + sent to the group chat. |
+
+ Message |
+createMessage()
+
++ Creates a new Message to send to the chat room. |
+
+ void |
+finalize()
+
++ |
+
+ String |
+getNickname()
+
++ Returns the nickname that was used to join the room, or null if not + currently joined. |
+
+ int |
+getParticipantCount()
+
++ Returns the number of participants in the group chat. |
+
+ Iterator |
+getParticipants()
+
++ Returns an Iterator (of Strings) for the list of fully qualified participants + in the group chat. |
+
+ String |
+getRoom()
+
++ Returns the name of the room this GroupChat object represents. |
+
+ boolean |
+isJoined()
+
++ Returns true if currently in the group chat (after calling the join(String) method. |
+
+ void |
+join(String nickname)
+
++ Joins the chat room using the specified nickname. |
+
+ void |
+join(String nickname,
+ long timeout)
+
++ Joins the chat room using the specified nickname. |
+
+ void |
+leave()
+
++ Leave the chat room. |
+
+ Message |
+nextMessage()
+
++ Returns the next available message in the chat. |
+
+ Message |
+nextMessage(long timeout)
+
++ Returns the next available message in the chat. |
+
+ Message |
+pollMessage()
+
++ Polls for and returns the next message, or null if there isn't + a message immediately available. |
+
+ void |
+sendMessage(Message message)
+
++ Sends a Message to the chat room. |
+
+ void |
+sendMessage(String text)
+
++ Sends a message to the chat room. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public GroupChat(XMPPConnection connection, + String room)+
join
the chat room. On some server implementations,
+ the room will not be created until the first person joins it.+ + Most XMPP servers use a sub-domain for the chat service (eg chat.example.com + for the XMPP server example.com). You must ensure that the room address you're + trying to connect to includes the proper chat sub-domain. +
+
connection
- the XMPP connection.room
- the name of the room in the form "roomName@service", where
+ "service" is the hostname at which the multi-user chat
+ service is running.+Method Detail | +
---|
+public String getRoom()+
+
+public void join(String nickname) + throws XMPPException+
+
nickname
- the nickname to use.
+XMPPException
- if an error occurs joining the room. In particular, a
+ 409 error can occur if someone is already in the group chat with the same
+ nickname.+public void join(String nickname, + long timeout) + throws XMPPException+
+
nickname
- the nickname to use.timeout
- the number of milleseconds to wait for a reply from the
+ group chat that joining the room succeeded.
+XMPPException
- if an error occurs joining the room. In particular, a
+ 409 error can occur if someone is already in the group chat with the same
+ nickname.+public boolean isJoined()+
join(String)
method.
++
+public void leave()+
+
+public String getNickname()+
+
+public int getParticipantCount()+
+ + Note: this value will only be accurate after joining the group chat, and + may fluctuate over time. If you query this value directly after joining the + group chat it may not be accurate, as it takes a certain amount of time for + the server to send all presence packets to this client. +
+
+public Iterator getParticipants()+
StringUtils.parseResource(String)
method.
+ Note: this value will only be accurate after joining the group chat, and may
+ fluctuate over time.
++
+public void addParticipantListener(PacketListener listener)+
+
listener
- a packet listener that will be notified of any presence packets
+ sent to the group chat.+public void sendMessage(String text) + throws XMPPException+
+
text
- the text of the message to send.
+XMPPException
- if sending the message fails.+public Message createMessage()+
+
+public void sendMessage(Message message) + throws XMPPException+
+
message
- the message.
+XMPPException
- if sending the message fails.+public Message pollMessage()+
nextMessage()
method since it's non-blocking.
+ In other words, the method call will always return immediately, whereas the
+ nextMessage method will return only when a message is available (or after
+ a specific timeout).
++
+public Message nextMessage()+
+
+public Message nextMessage(long timeout)+
+
timeout
- the maximum amount of time to wait for the next message.
++public void addMessageListener(PacketListener listener)+
+
listener
- a packet listener.+public void finalize() + throws Throwable+
finalize
in class Object
Throwable
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.PacketCollector +
public class PacketCollector
+Provides a mechanism to collect packets into a result queue that pass a
+ specified filter. The collector lets you perform blocking and polling
+ operations on the result queue. So, a PacketCollector is more suitable to
+ use than a PacketListener
when you need to wait for a specific
+ result.
+ + Each packet collector will queue up to 2^16 packets for processing before + older packets are automatically dropped. +
+ +
+
XMPPConnection.createPacketCollector(PacketFilter)
+Constructor Summary | +|
---|---|
+protected |
+PacketCollector(org.jivesoftware.smack.PacketReader packetReader,
+ PacketFilter packetFilter)
+
++ Creates a new packet collector. |
+
+Method Summary | +|
---|---|
+ void |
+cancel()
+
++ Explicitly cancels the packet collector so that no more results are + queued up. |
+
+ PacketFilter |
+getPacketFilter()
+
++ Returns the packet filter associated with this packet collector. |
+
+ Packet |
+nextResult()
+
++ Returns the next available packet. |
+
+ Packet |
+nextResult(long timeout)
+
++ Returns the next available packet. |
+
+ Packet |
+pollResult()
+
++ Polls to see if a packet is currently available and returns it, or + immediately returns null if no packets are currently in the + result queue. |
+
+protected void |
+processPacket(Packet packet)
+
++ Processes a packet to see if it meets the criteria for this packet collector. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+protected PacketCollector(org.jivesoftware.smack.PacketReader packetReader, + PacketFilter packetFilter)+
+
packetReader
- the packetReader the collector is tied to.packetFilter
- determines which packets will be returned by this collector.+Method Detail | +
---|
+public void cancel()+
+
+public PacketFilter getPacketFilter()+
+
+public Packet pollResult()+
+
+public Packet nextResult()+
+
+public Packet nextResult(long timeout)+
+
timeout
- the amount of time to wait for the next packet (in milleseconds).
++protected void processPacket(Packet packet)+
+
packet
- the packet to process.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface PacketInterceptor
+Provides a mechanism to intercept and modify packets that are going to be
+ sent to the server. PacketInterceptors are added to the XMPPConnection
+ together with a PacketFilter
so that only
+ certain packets are intercepted and processed by the interceptor.
+
+ This allows event-style programming -- every time a new packet is found,
+ the interceptPacket(Packet)
method will be called.
+
+ +
+
XMPPConnection.addPacketWriterInterceptor(PacketInterceptor, org.jivesoftware.smack.filter.PacketFilter)
+Method Summary | +|
---|---|
+ void |
+interceptPacket(Packet packet)
+
++ Process the packet that is about to be sent to the server. |
+
+Method Detail | +
---|
+void interceptPacket(Packet packet)+
+ + Interceptors are invoked using the same thread that requested the packet + to be sent, so it's very important that implementations of this method + not block for any extended period of time. +
+
packet
- the packet to is going to be sent to the server.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface PacketListener
+Provides a mechanism to listen for packets that pass a specified filter.
+ This allows event-style programming -- every time a new packet is found,
+ the processPacket(Packet)
method will be called. This is the
+ opposite approach to the functionality provided by a PacketCollector
+ which lets you block while waiting for results.
+
+ +
+
XMPPConnection.addPacketListener(PacketListener, org.jivesoftware.smack.filter.PacketFilter)
+Method Summary | +|
---|---|
+ void |
+processPacket(Packet packet)
+
++ Process the next packet sent to this packet listener. |
+
+Method Detail | +
---|
+void processPacket(Packet packet)+
+ + A single thread is responsible for invoking all listeners, so + it's very important that implementations of this method not block + for any extended period of time. +
+
packet
- the packet to process.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.Roster +
public class Roster
+Represents a user's roster, which is the collection of users a person receives + presence updates for. Roster items are categorized into groups for easier management.
+ + Others users may attempt to subscribe to this user using a subscription request. Three + modes are supported for handling these requests:
+ +
+
XMPPConnection.getRoster()
+Field Summary | +|
---|---|
+static int |
+SUBSCRIPTION_ACCEPT_ALL
+
++ Automatically accept all subscription and unsubscription requests. |
+
+static int |
+SUBSCRIPTION_MANUAL
+
++ Subscription requests are ignored, which means they must be manually + processed by registering a listener for presence packets and then looking + for any presence requests that have the type Presence.Type.SUBSCRIBE or + Presence.Type.UNSUBSCRIBE. |
+
+static int |
+SUBSCRIPTION_REJECT_ALL
+
++ Automatically reject all subscription requests. |
+
+Method Summary | +|
---|---|
+ void |
+addRosterListener(RosterListener rosterListener)
+
++ Adds a listener to this roster. |
+
+ boolean |
+contains(String user)
+
++ Returns true if the specified XMPP address is an entry in the roster. |
+
+ void |
+createEntry(String user,
+ String name,
+ String[] groups)
+
++ Creates a new roster entry and presence subscription. |
+
+ RosterGroup |
+createGroup(String name)
+
++ Creates a new group. |
+
+static int |
+getDefaultSubscriptionMode()
+
++ Returns the default subscription processing mode to use when a new Roster is created. |
+
+ Iterator |
+getEntries()
+
++ Returns all entries in the roster, including entries that don't belong to + any groups. |
+
+ RosterEntry |
+getEntry(String user)
+
++ Returns the roster entry associated with the given XMPP address or + null if the user is not an entry in the roster. |
+
+ int |
+getEntryCount()
+
++ Returns a count of the entries in the roster. |
+
+ RosterGroup |
+getGroup(String name)
+
++ Returns the roster group with the specified name, or null if the + group doesn't exist. |
+
+ int |
+getGroupCount()
+
++ Returns the number of the groups in the roster. |
+
+ Iterator |
+getGroups()
+
++ Returns an iterator the for all the roster groups. |
+
+ Presence |
+getPresence(String user)
+
++ Returns the presence info for a particular user, or null if the user + is unavailable (offline) or if no presence information is available, such as + when you are not subscribed to the user's presence updates. |
+
+ Presence |
+getPresenceResource(String userResource)
+
++ Returns the presence info for a particular user's resource, or null if the user + is unavailable (offline) or if no presence information is available, such as + when you are not subscribed to the user's presence updates. |
+
+ Iterator |
+getPresences(String user)
+
++ Returns an iterator (of Presence objects) for all the user's current presences + or null if the user is unavailable (offline) or if no presence information + is available, such as when you are not subscribed to the user's presence updates. |
+
+ int |
+getSubscriptionMode()
+
++ Returns the subscription processing mode, which dictates what action + Smack will take when subscription requests from other users are made. |
+
+ Iterator |
+getUnfiledEntries()
+
++ Returns an Iterator for the unfiled roster entries. |
+
+ int |
+getUnfiledEntryCount()
+
++ Returns a count of the unfiled entries in the roster. |
+
+ void |
+reload()
+
++ Reloads the entire roster from the server. |
+
+ void |
+removeEntry(RosterEntry entry)
+
++ Removes a roster entry from the roster. |
+
+ void |
+removeRosterListener(RosterListener rosterListener)
+
++ Removes a listener from this roster. |
+
+static void |
+setDefaultSubscriptionMode(int subscriptionMode)
+
++ Sets the default subscription processing mode to use when a new Roster is created. |
+
+ void |
+setSubscriptionMode(int subscriptionMode)
+
++ Sets the subscription processing mode, which dictates what action + Smack will take when subscription requests from other users are made. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final int SUBSCRIPTION_ACCEPT_ALL+
+
+public static final int SUBSCRIPTION_REJECT_ALL+
+
+public static final int SUBSCRIPTION_MANUAL+
+
+Method Detail | +
---|
+public static int getDefaultSubscriptionMode()+
SUBSCRIPTION_ACCEPT_ALL
.
++
+public static void setDefaultSubscriptionMode(int subscriptionMode)+
SUBSCRIPTION_ACCEPT_ALL
.
++
subscriptionMode
- the default subscription mode to use for new Rosters.+public int getSubscriptionMode()+
SUBSCRIPTION_ACCEPT_ALL
.
+
+ If using the manual mode, a PacketListener should be registered that
+ listens for Presence packets that have a type of
+ Presence.Type.SUBSCRIBE
.
+
+
+public void setSubscriptionMode(int subscriptionMode)+
SUBSCRIPTION_ACCEPT_ALL
.
+
+ If using the manual mode, a PacketListener should be registered that
+ listens for Presence packets that have a type of
+ Presence.Type.SUBSCRIBE
.
+
+
subscriptionMode
- the subscription mode.+public void reload()+
+
+public void addRosterListener(RosterListener rosterListener)+
+
rosterListener
- a roster listener.+public void removeRosterListener(RosterListener rosterListener)+
+
rosterListener
- a roster listener.+public RosterGroup createGroup(String name)+
+ + Note: you must add at least one entry to the group for the group to be kept + after a logout/login. This is due to the way that XMPP stores group information. +
+
name
- the name of the group.
++public void createEntry(String user, + String name, + String[] groups) + throws XMPPException+
+
user
- the user. (e.g. johndoe@jabber.org)name
- the nickname of the user.groups
- the list of group names the entry will belong to, or null if the
+ the roster entry won't belong to a group.
+XMPPException
+public void removeEntry(RosterEntry entry) + throws XMPPException+
+
entry
- a roster entry.
+XMPPException
+public int getEntryCount()+
+
+public Iterator getEntries()+
+
+public int getUnfiledEntryCount()+
+
+public Iterator getUnfiledEntries()+
+
+public RosterEntry getEntry(String user)+
+
user
- the XMPP address of the user (eg "jsmith@example.com"). The address could be
+ in any valid format (e.g. "domain/resource", "user@domain" or "user@domain/resource").
++public boolean contains(String user)+
+
user
- the XMPP address of the user (eg "jsmith@example.com"). The address could be
+ in any valid format (e.g. "domain/resource", "user@domain" or "user@domain/resource").
++public RosterGroup getGroup(String name)+
+
name
- the name of the group.
++public int getGroupCount()+
+
+public Iterator getGroups()+
+
+public Presence getPresence(String user)+
+ + If the user has several presences (one for each resource) then answer the presence + with the highest priority. +
+
user
- a fully qualified xmpp ID. The address could be in any valid format (e.g.
+ "domain/resource", "user@domain" or "user@domain/resource").
++public Presence getPresenceResource(String userResource)+
+
userResource
- a fully qualified xmpp ID including a resource.
++public Iterator getPresences(String user)+
+
user
- a fully qualified xmpp ID, e.g. jdoe@example.com
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.RosterEntry +
public class RosterEntry
+Each user in your roster is represented by a roster entry, which contains the user's + JID and a name or nickname you assign. +
+ +
+
+Method Summary | +|
---|---|
+ boolean |
+equals(Object object)
+
++ |
+
+ Iterator |
+getGroups()
+
++ Returns an iterator for all the roster groups that this entry belongs to. |
+
+ String |
+getName()
+
++ Returns the name associated with this entry. |
+
+ RosterPacket.ItemStatus |
+getStatus()
+
++ Returns the roster subscription status of the entry. |
+
+ RosterPacket.ItemType |
+getType()
+
++ Returns the roster subscription type of the entry. |
+
+ String |
+getUser()
+
++ Returns the JID of the user associated with this entry. |
+
+ void |
+setName(String name)
+
++ Sets the name associated with this entry. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Method Detail | +
---|
+public String getUser()+
+
+public String getName()+
+
+public void setName(String name)+
+
name
- the name.+public Iterator getGroups()+
+
+public RosterPacket.ItemType getType()+
RosterPacket.ItemType#NONE
or RosterPacket.ItemType#FROM
,
+ refer to getStatus()
to see if a subscription request
+ is pending.
++
+public RosterPacket.ItemStatus getStatus()+
+
+public String toString()+
toString
in class Object
+public boolean equals(Object object)+
equals
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.RosterGroup +
public class RosterGroup
+A group of roster entries. +
+ +
+
Roster.getGroup(String)
+Method Summary | +|
---|---|
+ void |
+addEntry(RosterEntry entry)
+
++ Adds a roster entry to this group. |
+
+ boolean |
+contains(RosterEntry entry)
+
++ Returns true if the specified entry is part of this group. |
+
+ boolean |
+contains(String user)
+
++ Returns true if the specified XMPP address is an entry in this group. |
+
+ Iterator |
+getEntries()
+
++ Returns an iterator for the entries in the group. |
+
+ RosterEntry |
+getEntry(String user)
+
++ Returns the roster entry associated with the given XMPP address or + null if the user is not an entry in the group. |
+
+ int |
+getEntryCount()
+
++ Returns the number of entries in the group. |
+
+ String |
+getName()
+
++ Returns the name of the group. |
+
+ void |
+removeEntry(RosterEntry entry)
+
++ Removes a roster entry from this group. |
+
+ void |
+setName(String name)
+
++ Sets the name of the group. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public String getName()+
+
+public void setName(String name)+
+
name
- the name of the group.+public int getEntryCount()+
+
+public Iterator getEntries()+
+
+public RosterEntry getEntry(String user)+
+
user
- the XMPP address of the user (eg "jsmith@example.com").
++public boolean contains(RosterEntry entry)+
+
entry
- a roster entry.
++public boolean contains(String user)+
+
user
- the XMPP address of the user.
++public void addEntry(RosterEntry entry) + throws XMPPException+
+
entry
- a roster entry.
+XMPPException
- if an error occured while trying to add the entry to the group.+public void removeEntry(RosterEntry entry) + throws XMPPException+
+
entry
- a roster entry.
+XMPPException
- if an error occured while trying to remove the entry from the group.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface RosterListener
+A listener that is fired any time a roster is changed or the presence of + a user in the roster is changed. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+entriesAdded(Collection addresses)
+
++ Called when roster entries are added. |
+
+ void |
+entriesDeleted(Collection addresses)
+
++ Called when a roster entries are removed. |
+
+ void |
+entriesUpdated(Collection addresses)
+
++ Called when a roster entries are updated. |
+
+ void |
+presenceChanged(String XMPPAddress)
+
++ Called when the presence of a roster entry is changed. |
+
+Method Detail | +
---|
+void entriesAdded(Collection addresses)+
+
addresses
- the XMPP addresses of the contacts that have been added to the roster.+void entriesUpdated(Collection addresses)+
+
addresses
- the XMPP addresses of the contacts whose entries have been updated.+void entriesDeleted(Collection addresses)+
+
addresses
- the XMPP addresses of the contacts that have been removed from the roster.+void presenceChanged(String XMPPAddress)+
+
XMPPAddress
- the XMPP address of the user who's presence has changed,
+ including the resource.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.SASLAuthentication +
public class SASLAuthentication
+This class is responsible authenticating the user using SASL, binding the resource + to the connection and establishing a session with the server.
+ + Once TLS has been negotiated (i.e. the connection has been secured) it is possible to + register with the server, authenticate using Non-SASL or authenticate using SASL. If the + server supports SASL then Smack will first try to authenticate using SASL. But if that + fails then Non-SASL will be tried.
+
+ The server may support many SASL mechanisms to use for authenticating. Out of the box
+ Smack provides SASL PLAIN but it is possible to register new SASL Mechanisms. Use
+ registerSASLMechanism(int, String, Class)
to add new mechanisms. See
+ SASLMechanism
.
+
+ Once the user has been authenticated with SASL, it is necessary to bind a resource for
+ the connection. If no resource is passed in authenticate(String, String, String)
+ then the server will assign a resource for the connection. In case a resource is passed
+ then the server will receive the desired resource but may assign a modified resource for
+ the connection.
+ + Once a resource has been binded and if the server supports sessions then Smack will establish + a session so that instant messaging and presence functionalities may be used. +
+ +
+
+Method Summary | +|
---|---|
+ String |
+authenticate(String username,
+ String password,
+ String resource)
+
++ Performs SASL authentication of the specified user. |
+
+ String |
+authenticateAnonymously()
+
++ Performs ANONYMOUS SASL authentication. |
+
+static List |
+getRegisterSASLMechanisms()
+
++ Returns the registerd SASLMechanism classes sorted by the level of preference. |
+
+ boolean |
+hasAnonymousAuthentication()
+
++ Returns true if the server offered ANONYMOUS SASL as a way to authenticate users. |
+
+ boolean |
+hasNonAnonymousAuthentication()
+
++ Returns true if the server offered SASL authentication besides ANONYMOUS SASL. |
+
+ boolean |
+isAuthenticated()
+
++ Returns true if the user was able to authenticate with the server usins SASL. |
+
+static void |
+registerSASLMechanism(int index,
+ String name,
+ Class mClass)
+
++ Registers a new SASL mechanism in the specified preference position. |
+
+ void |
+send(String stanza)
+
++ |
+
+static void |
+unregisterSASLMechanism(String name)
+
++ Unregisters an existing SASL mechanism. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public static void registerSASLMechanism(int index, + String name, + Class mClass)+
+
index
- preference position amongst all the implemented SASL mechanism. Starts with 0.name
- common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or KERBEROS_V4.mClass
- a SASLMechanism subclass.+public static void unregisterSASLMechanism(String name)+
+
name
- common name of the SASL mechanism. E.g.: PLAIN, DIGEST-MD5 or KERBEROS_V4.+public static List getRegisterSASLMechanisms()+
+
+public boolean hasAnonymousAuthentication()+
+
+public boolean hasNonAnonymousAuthentication()+
+
+public String authenticate(String username, + String password, + String resource) + throws XMPPException+
+ + The server may assign a full JID with a username or resource different than the requested + by this method. +
+
username
- the username that is authenticating with the server.password
- the password to send to the server.resource
- the desired resource.
+XMPPException
- if an error occures while authenticating.+public String authenticateAnonymously() + throws XMPPException+
+ + The server will assign a full JID with a randomly generated resource and possibly with + no username. +
+
XMPPException
- if an error occures while authenticating.+public boolean isAuthenticated()+
+
+public void send(String stanza) + throws IOException+
IOException
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.XMPPConnection +
org.jivesoftware.smack.SSLXMPPConnection +
public class SSLXMPPConnection
+Creates an SSL connection to a XMPP server using the legacy dedicated SSL port + mechanism. Fully compliant XMPP 1.0 servers (e.g. Wildfire 2.4.0) do not + require using a dedicated SSL port. Instead, TLS (a standardized version of SSL 3.0) + is dynamically negotiated over the standard XMPP port. Therefore, only use this + class to connect to an XMPP server if you know that the server does not support + XMPP 1.0 TLS connections. +
+ +
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.XMPPConnection | +
---|
DEBUG_ENABLED |
+
+Constructor Summary | +|
---|---|
SSLXMPPConnection(String host)
+
++ Creates a new SSL connection to the specified host on the default + SSL port (5223). |
+|
SSLXMPPConnection(String host,
+ int port)
+
++ Creates a new SSL connection to the specified host on the specified port. |
+|
SSLXMPPConnection(String host,
+ int port,
+ String serviceName)
+
++ Creates a new SSL connection to the specified XMPP server on the given host and port. |
+
+Method Summary | +|
---|---|
+ boolean |
+isSecureConnection()
+
++ Returns true if the connection is a secured one, such as an SSL connection or + if TLS was negotiated successfully. |
+
Methods inherited from class org.jivesoftware.smack.XMPPConnection | +
---|
addConnectionListener, addConnectionListener, addPacketListener, addPacketWriterInterceptor, addPacketWriterListener, close, createChat, createGroupChat, createPacketCollector, getAccountManager, getConnectionID, getHost, getPort, getRoster, getSASLAuthentication, getServiceName, getUser, isAnonymous, isAuthenticated, isConnected, isUsingCompression, isUsingTLS, login, login, login, loginAnonymously, removeConnectionListener, removeConnectionListener, removePacketListener, removePacketWriterInterceptor, removePacketWriterListener, sendPacket |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SSLXMPPConnection(String host) + throws XMPPException+
+
host
- the XMPP host.
+XMPPException
- if an error occurs while trying to establish the connection.
+ Two possible errors can occur which will be wrapped by an XMPPException --
+ UnknownHostException (XMPP error code 504), and IOException (XMPP error code
+ 502). The error codes and wrapped exceptions can be used to present more
+ appropiate error messages to end-users.+public SSLXMPPConnection(String host, + int port) + throws XMPPException+
+
host
- the XMPP host.port
- the port to use for the connection (default XMPP SSL port is 5223).
+XMPPException
- if an error occurs while trying to establish the connection.
+ Two possible errors can occur which will be wrapped by an XMPPException --
+ UnknownHostException (XMPP error code 504), and IOException (XMPP error code
+ 502). The error codes and wrapped exceptions can be used to present more
+ appropiate error messages to end-users.+public SSLXMPPConnection(String host, + int port, + String serviceName) + throws XMPPException+
+
host
- the host name, or null for the loopback address.port
- the port on the server that should be used (default XMPP SSL port is 5223).serviceName
- the name of the XMPP server to connect to; e.g. jivesoftware.com.
+XMPPException
- if an error occurs while trying to establish the connection.
+ Two possible errors can occur which will be wrapped by an XMPPException --
+ UnknownHostException (XMPP error code 504), and IOException (XMPP error code
+ 502). The error codes and wrapped exceptions can be used to present more
+ appropiate error messages to end-users.+Method Detail | +
---|
+public boolean isSecureConnection()+
XMPPConnection
+
isSecureConnection
in class XMPPConnection
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.SmackConfiguration +
public final class SmackConfiguration
+Represents the configuration of Smack. The configuration is used for: +
+ +
+
+Method Summary | +|
---|---|
+static int |
+getKeepAliveInterval()
+
++ Returns the number of milleseconds delay between sending keep-alive + requests to the server. |
+
+static int |
+getPacketReplyTimeout()
+
++ Returns the number of milliseconds to wait for a response from + the server. |
+
+static String |
+getVersion()
+
++ Returns the Smack version information, eg "1.3.0". |
+
+static void |
+setKeepAliveInterval(int interval)
+
++ Sets the number of milleseconds delay between sending keep-alive + requests to the server. |
+
+static void |
+setPacketReplyTimeout(int timeout)
+
++ Sets the number of milliseconds to wait for a response from + the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public static String getVersion()+
+
+public static int getPacketReplyTimeout()+
+
+public static void setPacketReplyTimeout(int timeout)+
+
timeout
- the milliseconds to wait for a response from the server+public static int getKeepAliveInterval()+
+
+public static void setKeepAliveInterval(int interval)+
+
interval
- the milliseconds to wait between keep-alive requests,
+ or -1 if no keep-alive should be sent.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.XMPPConnection +
public class XMPPConnection
+Creates a connection to a XMPP server. A simple use of this API might + look like the following: +
+ // Create a connection to the jivesoftware.com XMPP server. + XMPPConnection con = new XMPPConnection("jivesoftware.com"); + // Most servers require you to login before performing other tasks. + con.login("jsmith", "mypass"); + // Start a new conversation with John Doe and send him a message. + Chat chat = con.createChat("jdoe@jabber.org"); + chat.sendMessage("Hey, how's it going?"); ++
+ +
+
+Field Summary | +|
---|---|
+static boolean |
+DEBUG_ENABLED
+
++ Value that indicates whether debugging is enabled. |
+
+Constructor Summary | +|
---|---|
XMPPConnection(ConnectionConfiguration config)
+
++ |
+|
XMPPConnection(ConnectionConfiguration config,
+ javax.net.SocketFactory socketFactory)
+
++ |
+|
XMPPConnection(String serviceName)
+
++ Creates a new connection to the specified XMPP server. |
+|
XMPPConnection(String host,
+ int port)
+
++ Creates a new connection to the XMPP server at the specifiec host and port. |
+|
XMPPConnection(String host,
+ int port,
+ String serviceName)
+
++ Creates a new connection to the specified XMPP server on the given host and port. |
+|
XMPPConnection(String host,
+ int port,
+ String serviceName,
+ javax.net.SocketFactory socketFactory)
+
++ Creates a new connection to the specified XMPP server on the given port using the + specified SocketFactory. |
+
+Method Summary | +|
---|---|
+static void |
+addConnectionListener(ConnectionEstablishedListener connectionEstablishedListener)
+
++ Adds a connection established listener that will be notified when a new connection + is established. |
+
+ void |
+addConnectionListener(ConnectionListener connectionListener)
+
++ Adds a connection listener to this connection that will be notified when + the connection closes or fails. |
+
+ void |
+addPacketListener(PacketListener packetListener,
+ PacketFilter packetFilter)
+
++ Registers a packet listener with this connection. |
+
+ void |
+addPacketWriterInterceptor(PacketInterceptor packetInterceptor,
+ PacketFilter packetFilter)
+
++ Registers a packet interceptor with this connection. |
+
+ void |
+addPacketWriterListener(PacketListener packetListener,
+ PacketFilter packetFilter)
+
++ Registers a packet listener with this connection. |
+
+ void |
+close()
+
++ Closes the connection by setting presence to unavailable then closing the stream to + the XMPP server. |
+
+ Chat |
+createChat(String participant)
+
++ Creates a new chat with the specified participant. |
+
+ GroupChat |
+createGroupChat(String room)
+
++ Creates a new group chat connected to the specified room. |
+
+ PacketCollector |
+createPacketCollector(PacketFilter packetFilter)
+
++ Creates a new packet collector for this connection. |
+
+ AccountManager |
+getAccountManager()
+
++ Returns an account manager instance for this connection. |
+
+ String |
+getConnectionID()
+
++ Returns the connection ID for this connection, which is the value set by the server + when opening a XMPP stream. |
+
+ String |
+getHost()
+
++ Returns the host name of the server where the XMPP server is running. |
+
+ int |
+getPort()
+
++ Returns the port number of the XMPP server for this connection. |
+
+ Roster |
+getRoster()
+
++ Returns the roster for the user logged into the server. |
+
+ SASLAuthentication |
+getSASLAuthentication()
+
++ Returns the SASLAuthentication manager that is responsible for authenticating with + the server. |
+
+ String |
+getServiceName()
+
++ Returns the name of the service provided by the XMPP server for this connection. |
+
+ String |
+getUser()
+
++ Returns the full XMPP address of the user that is logged in to the connection or + null if not logged in yet. |
+
+ boolean |
+isAnonymous()
+
++ Returns true if currently authenticated anonymously. |
+
+ boolean |
+isAuthenticated()
+
++ Returns true if currently authenticated by successfully calling the login method. |
+
+ boolean |
+isConnected()
+
++ Returns true if currently connected to the XMPP server. |
+
+ boolean |
+isSecureConnection()
+
++ Returns true if the connection is a secured one, such as an SSL connection or + if TLS was negotiated successfully. |
+
+ boolean |
+isUsingCompression()
+
++ Returns true if network traffic is being compressed. |
+
+ boolean |
+isUsingTLS()
+
++ Returns true if the connection to the server has successfully negotiated TLS. |
+
+ void |
+login(String username,
+ String password)
+
++ Logs in to the server using the strongest authentication mode supported by + the server, then set our presence to available. |
+
+ void |
+login(String username,
+ String password,
+ String resource)
+
++ Logs in to the server using the strongest authentication mode supported by + the server, then sets presence to available. |
+
+ void |
+login(String username,
+ String password,
+ String resource,
+ boolean sendPresence)
+
++ Logs in to the server using the strongest authentication mode supported by + the server. |
+
+ void |
+loginAnonymously()
+
++ Logs in to the server anonymously. |
+
+static void |
+removeConnectionListener(ConnectionEstablishedListener connectionEstablishedListener)
+
++ Removes a listener on new established connections. |
+
+ void |
+removeConnectionListener(ConnectionListener connectionListener)
+
++ Removes a connection listener from this connection. |
+
+ void |
+removePacketListener(PacketListener packetListener)
+
++ Removes a packet listener from this connection. |
+
+ void |
+removePacketWriterInterceptor(PacketInterceptor packetInterceptor)
+
++ Removes a packet interceptor. |
+
+ void |
+removePacketWriterListener(PacketListener packetListener)
+
++ Removes a packet listener from this connection. |
+
+ void |
+sendPacket(Packet packet)
+
++ Sends the specified packet to the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static boolean DEBUG_ENABLED+
+
+Constructor Detail | +
---|
+public XMPPConnection(String serviceName) + throws XMPPException+
+
serviceName
- the name of the XMPP server to connect to; e.g. jivesoftware.com.
+XMPPException
- if an error occurs while trying to establish the connection.
+ Two possible errors can occur which will be wrapped by an XMPPException --
+ UnknownHostException (XMPP error code 504), and IOException (XMPP error code
+ 502). The error codes and wrapped exceptions can be used to present more
+ appropiate error messages to end-users.+public XMPPConnection(String host, + int port) + throws XMPPException+
+
host
- the name of the XMPP server to connect to; e.g. jivesoftware.com.port
- the port on the server that should be used; e.g. 5222.
+XMPPException
- if an error occurs while trying to establish the connection.
+ Two possible errors can occur which will be wrapped by an XMPPException --
+ UnknownHostException (XMPP error code 504), and IOException (XMPP error code
+ 502). The error codes and wrapped exceptions can be used to present more
+ appropiate error messages to end-users.+public XMPPConnection(String host, + int port, + String serviceName) + throws XMPPException+
+
host
- the host name, or null for the loopback address.port
- the port on the server that should be used; e.g. 5222.serviceName
- the name of the XMPP server to connect to; e.g. jivesoftware.com.
+XMPPException
- if an error occurs while trying to establish the connection.
+ Two possible errors can occur which will be wrapped by an XMPPException --
+ UnknownHostException (XMPP error code 504), and IOException (XMPP error code
+ 502). The error codes and wrapped exceptions can be used to present more
+ appropiate error messages to end-users.+public XMPPConnection(String host, + int port, + String serviceName, + javax.net.SocketFactory socketFactory) + throws XMPPException+
+ + A custom SocketFactory allows fine-grained control of the actual connection to the + XMPP server. A typical use for a custom SocketFactory is when connecting through a + SOCKS proxy. +
+
host
- the host name, or null for the loopback address.port
- the port on the server that should be used; e.g. 5222.serviceName
- the name of the XMPP server to connect to; e.g. jivesoftware.com.socketFactory
- a SocketFactory that will be used to create the socket to the XMPP
+ server.
+XMPPException
- if an error occurs while trying to establish the connection.
+ Two possible errors can occur which will be wrapped by an XMPPException --
+ UnknownHostException (XMPP error code 504), and IOException (XMPP error code
+ 502). The error codes and wrapped exceptions can be used to present more
+ appropiate error messages to end-users.+public XMPPConnection(ConnectionConfiguration config) + throws XMPPException+
XMPPException
+public XMPPConnection(ConnectionConfiguration config, + javax.net.SocketFactory socketFactory) + throws XMPPException+
XMPPException
+Method Detail | +
---|
+public String getConnectionID()+
+
+public String getServiceName()+
+
+public String getHost()+
+
+public int getPort()+
+
+public String getUser()+
+
+public void login(String username, + String password) + throws XMPPException+
+
username
- the username.password
- the password.
+XMPPException
- if an error occurs.+public void login(String username, + String password, + String resource) + throws XMPPException+
+
username
- the username.password
- the password.resource
- the resource.
+XMPPException
- if an error occurs.
+IllegalStateException
- if not connected to the server, or already logged in
+ to the serrver.+public void login(String username, + String password, + String resource, + boolean sendPresence) + throws XMPPException+
+
username
- the username.password
- the password.resource
- the resource.sendPresence
- if true an available presence will be sent automatically
+ after login is completed.
+XMPPException
- if an error occurs.
+IllegalStateException
- if not connected to the server, or already logged in
+ to the serrver.+public void loginAnonymously() + throws XMPPException+
+
XMPPException
- if an error occurs or anonymous logins are not supported by the server.
+IllegalStateException
- if not connected to the server, or already logged in
+ to the serrver.+public Roster getRoster()+
+
+public AccountManager getAccountManager()+
+
+public Chat createChat(String participant)+
+
participant
- the person to start the conversation with.
++public GroupChat createGroupChat(String room)+
+ Most XMPP servers use a sub-domain for the chat service (eg chat.example.com + for the XMPP server example.com). You must ensure that the room address you're + trying to connect to includes the proper chat sub-domain. +
+
room
- the fully qualifed name of the room.
++public boolean isConnected()+
+
+public boolean isSecureConnection()+
+
+public boolean isAuthenticated()+
+
+public boolean isAnonymous()+
+
+public void close()+
+
+public void sendPacket(Packet packet)+
+
packet
- the packet to send.+public void addPacketListener(PacketListener packetListener, + PacketFilter packetFilter)+
+
packetListener
- the packet listener to notify of new packets.packetFilter
- the packet filter to use.+public void removePacketListener(PacketListener packetListener)+
+
packetListener
- the packet listener to remove.+public void addPacketWriterListener(PacketListener packetListener, + PacketFilter packetFilter)+
+
packetListener
- the packet listener to notify of sent packets.packetFilter
- the packet filter to use.+public void removePacketWriterListener(PacketListener packetListener)+
+
packetListener
- the packet listener to remove.+public void addPacketWriterInterceptor(PacketInterceptor packetInterceptor, + PacketFilter packetFilter)+
+
packetInterceptor
- the packet interceptor to notify of packets about to be sent.packetFilter
- the packet filter to use.+public void removePacketWriterInterceptor(PacketInterceptor packetInterceptor)+
+
packetInterceptor
- the packet interceptor to remove.+public PacketCollector createPacketCollector(PacketFilter packetFilter)+
+
packetFilter
- the packet filter to use.
++public void addConnectionListener(ConnectionListener connectionListener)+
+
connectionListener
- a connection listener.+public void removeConnectionListener(ConnectionListener connectionListener)+
+
connectionListener
- a connection listener.+public static void addConnectionListener(ConnectionEstablishedListener connectionEstablishedListener)+
+
connectionEstablishedListener
- a listener interested on connection established events.+public static void removeConnectionListener(ConnectionEstablishedListener connectionEstablishedListener)+
+
connectionEstablishedListener
- a listener interested on connection established events.+public boolean isUsingTLS()+
+
+public SASLAuthentication getSASLAuthentication()+
+
+public boolean isUsingCompression()+
+ + Note: To use stream compression the smackx.jar file has to be present in the classpath. +
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.lang.Throwable +
java.lang.Exception +
org.jivesoftware.smack.XMPPException +
public class XMPPException
+A generic exception that is thrown when an error occurs performing an + XMPP operation. XMPP servers can respond to error conditions with an error code + and textual description of the problem, which are encapsulated in the XMPPError + class. When appropriate, an XMPPError instance is attached instances of this exception.
+ + When a stream error occured, the server will send a stream error to the client before + closing the connection. Stream errors are unrecoverable errors. When a stream error + is sent to the client an XMPPException will be thrown containing the StreamError sent + by the server. +
+ +
+
XMPPError
,
+Serialized Form+Constructor Summary | +|
---|---|
XMPPException()
+
++ Creates a new XMPPException. |
+|
XMPPException(StreamError streamError)
+
++ Cretaes a new XMPPException with the stream error that was the root case of the + exception. |
+|
XMPPException(String message)
+
++ Creates a new XMPPException with a description of the exception. |
+|
XMPPException(String message,
+ Throwable wrappedThrowable)
+
++ Creates a new XMPPException with a description of the exception and the + Throwable that was the root cause of the exception. |
+|
XMPPException(String message,
+ XMPPError error)
+
++ Creates a new XMPPException with a description of the exception and the + XMPPException that was the root cause of the exception. |
+|
XMPPException(String message,
+ XMPPError error,
+ Throwable wrappedThrowable)
+
++ Creates a new XMPPException with a description of the exception, an XMPPError, + and the Throwable that was the root cause of the exception. |
+|
XMPPException(Throwable wrappedThrowable)
+
++ Creates a new XMPPException with the Throwable that was the root cause of the + exception. |
+|
XMPPException(XMPPError error)
+
++ Cretaes a new XMPPException with the XMPPError that was the root case of the + exception. |
+
+Method Summary | +|
---|---|
+ String |
+getMessage()
+
++ |
+
+ StreamError |
+getStreamError()
+
++ Returns the StreamError asscociated with this exception, or null if there + isn't one. |
+
+ Throwable |
+getWrappedThrowable()
+
++ Returns the Throwable asscociated with this exception, or null if there + isn't one. |
+
+ XMPPError |
+getXMPPError()
+
++ Returns the XMPPError asscociated with this exception, or null if there + isn't one. |
+
+ void |
+printStackTrace()
+
++ |
+
+ void |
+printStackTrace(PrintStream out)
+
++ |
+
+ void |
+printStackTrace(PrintWriter out)
+
++ |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Throwable | +
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public XMPPException()+
+
+public XMPPException(String message)+
+
message
- description of the exception.+public XMPPException(Throwable wrappedThrowable)+
+
wrappedThrowable
- the root cause of the exception.+public XMPPException(StreamError streamError)+
+
streamError
- the root cause of the exception.+public XMPPException(XMPPError error)+
+
error
- the root cause of the exception.+public XMPPException(String message, + Throwable wrappedThrowable)+
+
message
- a description of the exception.wrappedThrowable
- the root cause of the exception.+public XMPPException(String message, + XMPPError error, + Throwable wrappedThrowable)+
+
message
- a description of the exception.error
- the root cause of the exception.wrappedThrowable
- the root cause of the exception.+public XMPPException(String message, + XMPPError error)+
+
message
- a description of the exception.error
- the root cause of the exception.+Method Detail | +
---|
+public XMPPError getXMPPError()+
+
+public StreamError getStreamError()+
+
+public Throwable getWrappedThrowable()+
+
+public void printStackTrace()+
printStackTrace
in class Throwable
+public void printStackTrace(PrintStream out)+
printStackTrace
in class Throwable
+public void printStackTrace(PrintWriter out)+
printStackTrace
in class Throwable
+public String getMessage()+
getMessage
in class Throwable
+public String toString()+
toString
in class Throwable
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.debugger.ConsoleDebugger +
public class ConsoleDebugger
+Very simple debugger that prints to the console (stdout) the sent and received stanzas. Use + this debugger with caution since printing to the console is an expensive operation that may + even block the thread since only one thread may print at a time.
+
+ It is possible to not only print the raw sent and received stanzas but also the interpreted + packets by Smack. By default interpreted packets won't be printed. To enable this feature + just change the printInterpreted static variable to true. ++ +
+
+Field Summary | +|
---|---|
+static boolean |
+printInterpreted
+
++ |
+
+Constructor Summary | +|
---|---|
ConsoleDebugger(XMPPConnection connection,
+ Writer writer,
+ Reader reader)
+
++ |
+
+Method Summary | +|
---|---|
+ Reader |
+getReader()
+
++ Returns the special Reader that wraps the main Reader and logs data to the GUI. |
+
+ PacketListener |
+getReaderListener()
+
++ Returns the thread that will listen for all incoming packets and write them to the GUI. |
+
+ Writer |
+getWriter()
+
++ Returns the special Writer that wraps the main Writer and logs data to the GUI. |
+
+ PacketListener |
+getWriterListener()
+
++ Returns the thread that will listen for all outgoing packets and write them to the GUI. |
+
+ Reader |
+newConnectionReader(Reader newReader)
+
++ Returns a new special Reader that wraps the new connection Reader. |
+
+ Writer |
+newConnectionWriter(Writer newWriter)
+
++ Returns a new special Writer that wraps the new connection Writer. |
+
+ void |
+userHasLogged(String user)
+
++ Called when a user has logged in to the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static boolean printInterpreted+
+Constructor Detail | +
---|
+public ConsoleDebugger(XMPPConnection connection, + Writer writer, + Reader reader)+
+Method Detail | +
---|
+public Reader newConnectionReader(Reader newReader)+
SmackDebugger
+
newConnectionReader
in interface SmackDebugger
+public Writer newConnectionWriter(Writer newWriter)+
SmackDebugger
+
newConnectionWriter
in interface SmackDebugger
+public void userHasLogged(String user)+
SmackDebugger
+
userHasLogged
in interface SmackDebugger
user
- the user@host/resource that has just logged in+public Reader getReader()+
SmackDebugger
+
getReader
in interface SmackDebugger
+public Writer getWriter()+
SmackDebugger
+
getWriter
in interface SmackDebugger
+public PacketListener getReaderListener()+
SmackDebugger
+
getReaderListener
in interface SmackDebugger
+public PacketListener getWriterListener()+
SmackDebugger
+
getWriterListener
in interface SmackDebugger
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.debugger.LiteDebugger +
public class LiteDebugger
+The LiteDebugger is a very simple debugger that allows to debug sent, received and + interpreted messages. +
+ +
+
+Constructor Summary | +|
---|---|
LiteDebugger(XMPPConnection connection,
+ Writer writer,
+ Reader reader)
+
++ |
+
+Method Summary | +|
---|---|
+ Reader |
+getReader()
+
++ Returns the special Reader that wraps the main Reader and logs data to the GUI. |
+
+ PacketListener |
+getReaderListener()
+
++ Returns the thread that will listen for all incoming packets and write them to the GUI. |
+
+ Writer |
+getWriter()
+
++ Returns the special Writer that wraps the main Writer and logs data to the GUI. |
+
+ PacketListener |
+getWriterListener()
+
++ Returns the thread that will listen for all outgoing packets and write them to the GUI. |
+
+ Reader |
+newConnectionReader(Reader newReader)
+
++ Returns a new special Reader that wraps the new connection Reader. |
+
+ Writer |
+newConnectionWriter(Writer newWriter)
+
++ Returns a new special Writer that wraps the new connection Writer. |
+
+ void |
+rootWindowClosing(WindowEvent evt)
+
++ Notification that the root window is closing. |
+
+ void |
+userHasLogged(String user)
+
++ Called when a user has logged in to the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public LiteDebugger(XMPPConnection connection, + Writer writer, + Reader reader)+
+Method Detail | +
---|
+public void rootWindowClosing(WindowEvent evt)+
+
evt
- the event that indicates that the root window is closing+public Reader newConnectionReader(Reader newReader)+
SmackDebugger
+
newConnectionReader
in interface SmackDebugger
+public Writer newConnectionWriter(Writer newWriter)+
SmackDebugger
+
newConnectionWriter
in interface SmackDebugger
+public void userHasLogged(String user)+
SmackDebugger
+
userHasLogged
in interface SmackDebugger
user
- the user@host/resource that has just logged in+public Reader getReader()+
SmackDebugger
+
getReader
in interface SmackDebugger
+public Writer getWriter()+
SmackDebugger
+
getWriter
in interface SmackDebugger
+public PacketListener getReaderListener()+
SmackDebugger
+
getReaderListener
in interface SmackDebugger
+public PacketListener getWriterListener()+
SmackDebugger
+
getWriterListener
in interface SmackDebugger
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface SmackDebugger
+Interface that allows for implementing classes to debug XML traffic. That is a GUI window that + displays XML traffic.
+ + Every implementation of this interface must have a public constructor with the following + arguments: XMPPConnection, Writer, Reader. +
+ +
+
+Method Summary | +|
---|---|
+ Reader |
+getReader()
+
++ Returns the special Reader that wraps the main Reader and logs data to the GUI. |
+
+ PacketListener |
+getReaderListener()
+
++ Returns the thread that will listen for all incoming packets and write them to the GUI. |
+
+ Writer |
+getWriter()
+
++ Returns the special Writer that wraps the main Writer and logs data to the GUI. |
+
+ PacketListener |
+getWriterListener()
+
++ Returns the thread that will listen for all outgoing packets and write them to the GUI. |
+
+ Reader |
+newConnectionReader(Reader reader)
+
++ Returns a new special Reader that wraps the new connection Reader. |
+
+ Writer |
+newConnectionWriter(Writer writer)
+
++ Returns a new special Writer that wraps the new connection Writer. |
+
+ void |
+userHasLogged(String user)
+
++ Called when a user has logged in to the server. |
+
+Method Detail | +
---|
+void userHasLogged(String user)+
+
user
- the user@host/resource that has just logged in+Reader getReader()+
+
+Writer getWriter()+
+
+Reader newConnectionReader(Reader reader)+
+
+Writer newConnectionWriter(Writer writer)+
+
+PacketListener getReaderListener()+
+
+PacketListener getWriterListener()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +SmackDebugger |
+
+Classes
+
+ +ConsoleDebugger + +LiteDebugger |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
SmackDebugger | +Interface that allows for implementing classes to debug XML traffic. | +
+ +
+Class Summary | +|
---|---|
ConsoleDebugger | +Very simple debugger that prints to the console (stdout) the sent and received stanzas. | +
LiteDebugger | +The LiteDebugger is a very simple debugger that allows to debug sent, received and + interpreted messages. | +
+Core debugger functionality. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.AndFilter +
public class AndFilter
+Implements the logical AND operation over two or more packet filters. + In other words, packets pass this filter if they pass all of the filters. +
+ +
+
+Constructor Summary | +|
---|---|
AndFilter()
+
++ Creates an empty AND filter. |
+|
AndFilter(PacketFilter filter1,
+ PacketFilter filter2)
+
++ Creates an AND filter using the two specified filters. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
+ void |
+addFilter(PacketFilter filter)
+
++ Adds a filter to the filter list for the AND operation. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public AndFilter()+
addFilter(PacketFilter)
method.
++
+public AndFilter(PacketFilter filter1, + PacketFilter filter2)+
+
filter1
- the first packet filter.filter2
- the second packet filter.+Method Detail | +
---|
+public void addFilter(PacketFilter filter)+
+
filter
- a filter to add to the filter list.+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
++public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.FromContainsFilter +
public class FromContainsFilter
+Filters for packets where the "from" field contains a specified value. +
+ +
+
+Constructor Summary | +|
---|---|
FromContainsFilter(String from)
+
++ Creates a "from" contains filter using the "from" field part. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public FromContainsFilter(String from)+
+
from
- the from field value the packet must contain.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.FromMatchesFilter +
public class FromMatchesFilter
+Filter for packets where the "from" field exactly matches a specified JID. If the specified + address is a bare JID then the filter will match any address whose bare JID matches the + specified JID. But if the specified address is a full JID then the filter will only match + if the sender of the packet matches the specified resource. +
+ +
+
+Constructor Summary | +|
---|---|
FromMatchesFilter(String address)
+
++ Creates a "from" filter using the "from" field part. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public FromMatchesFilter(String address)+
+
address
- the from field value the packet must match. Could be a full or bare JID.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.IQTypeFilter +
public class IQTypeFilter
+A filter for IQ packet types. Returns true only if the packet is an IQ packet + and it matches the type provided in the constructor. +
+ +
+
+Constructor Summary | +|
---|---|
IQTypeFilter(IQ.Type type)
+
++ |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public IQTypeFilter(IQ.Type type)+
+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.MessageTypeFilter +
public class MessageTypeFilter
+Filters for packets of a specific type of Message (e.g. CHAT). +
+ +
+
Message.Type
+Constructor Summary | +|
---|---|
MessageTypeFilter(Message.Type type)
+
++ Creates a new message type filter using the specified message type. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MessageTypeFilter(Message.Type type)+
+
type
- the message type.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.NotFilter +
public class NotFilter
+Implements the logical NOT operation on a packet filter. In other words, packets + pass this filter if they do not pass the supplied filter. +
+ +
+
+Constructor Summary | +|
---|---|
NotFilter(PacketFilter filter)
+
++ Creates a NOT filter using the specified filter. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public NotFilter(PacketFilter filter)+
+
filter
- the filter.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.OrFilter +
public class OrFilter
+Implements the logical OR operation over two or more packet filters. In + other words, packets pass this filter if they pass any of the filters. +
+ +
+
+Constructor Summary | +|
---|---|
OrFilter()
+
++ Creates an empty OR filter. |
+|
OrFilter(PacketFilter filter1,
+ PacketFilter filter2)
+
++ Creates an OR filter using the two specified filters. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
+ void |
+addFilter(PacketFilter filter)
+
++ Adds a filter to the filter list for the OR operation. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OrFilter()+
addFilter(PacketFilter)
method.
++
+public OrFilter(PacketFilter filter1, + PacketFilter filter2)+
+
filter1
- the first packet filter.filter2
- the second packet filter.+Method Detail | +
---|
+public void addFilter(PacketFilter filter)+
+
filter
- a filter to add to the filter list.+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
++public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.PacketExtensionFilter +
public class PacketExtensionFilter
+Filters for packets with a particular type of packet extension. +
+ +
+
+Constructor Summary | +|
---|---|
PacketExtensionFilter(String elementName,
+ String namespace)
+
++ Creates a new packet extension filter. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public PacketExtensionFilter(String elementName, + String namespace)+
+
elementName
- the XML element name of the packet extension.namespace
- the XML namespace of the packet extension.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface PacketFilter
+Defines a way to filter packets for particular attributes. Packet filters are + used when constructing packet listeners or collectors -- the filter defines + what packets match the criteria of the collector or listener for further + packet processing.
+
+ Several pre-defined filters are defined. These filters can be logically combined
+ for more complex packet filtering by using the
+ AndFilter
and
+ OrFilter
filters. It's also possible
+ to define your own filters by implementing this interface. The code example below
+ creates a trivial filter for packets with a specific ID.
+
+
+ // Use an anonymous inner class to define a packet filter that returns + // all packets that have a packet ID of "RS145". + PacketFilter myFilter = new PacketFilter() { + public boolean accept(Packet packet) { + return "RS145".equals(packet.getPacketID()); + } + }; + // Create a new packet collector using the filter we created. + PacketCollector myCollector = packetReader.createPacketCollector(myFilter); ++
+ +
+
PacketCollector
,
+PacketListener
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
+Method Detail | +
---|
+boolean accept(Packet packet)+
+
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.PacketIDFilter +
public class PacketIDFilter
+Filters for packets with a particular packet ID. +
+ +
+
+Constructor Summary | +|
---|---|
PacketIDFilter(String packetID)
+
++ Creates a new packet ID filter using the specified packet ID. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public PacketIDFilter(String packetID)+
+
packetID
- the packet ID to filter for.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.PacketTypeFilter +
public class PacketTypeFilter
+Filters for packets of a particular type. The type is given as a Class object, so + example types would: +
+ +
+
+Constructor Summary | +|
---|---|
PacketTypeFilter(Class packetType)
+
++ Creates a new packet type filter that will filter for packets that are the + same type as packetType. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public PacketTypeFilter(Class packetType)+
+
packetType
- the Class type.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.ThreadFilter +
public class ThreadFilter
+Filters for message packets with a particular thread value. +
+ +
+
+Constructor Summary | +|
---|---|
ThreadFilter(String thread)
+
++ Creates a new thread filter using the specified thread value. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ThreadFilter(String thread)+
+
thread
- the thread value to filter for.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.filter.ToContainsFilter +
public class ToContainsFilter
+Filters for packets where the "to" field contains a specified value. For example, + the filter could be used to listen for all packets sent to a group chat nickname. +
+ +
+
+Constructor Summary | +|
---|---|
ToContainsFilter(String to)
+
++ Creates a "to" contains filter using the "to" field part. |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(Packet packet)
+
++ Tests whether or not the specified packet should pass the filter. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ToContainsFilter(String to)+
+
to
- the to field value the packet must contain.+Method Detail | +
---|
+public boolean accept(Packet packet)+
PacketFilter
+
accept
in interface PacketFilter
packet
- the packet to test.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +PacketFilter |
+
+Classes
+
+ +AndFilter + +FromContainsFilter + +FromMatchesFilter + +IQTypeFilter + +MessageTypeFilter + +NotFilter + +OrFilter + +PacketExtensionFilter + +PacketIDFilter + +PacketTypeFilter + +ThreadFilter + +ToContainsFilter |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
PacketCollector
and PacketListener
instances to filter for packets with particular attributes.
+
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
PacketFilter | +Defines a way to filter packets for particular attributes. | +
+ +
+Class Summary | +|
---|---|
AndFilter | +Implements the logical AND operation over two or more packet filters. | +
FromContainsFilter | +Filters for packets where the "from" field contains a specified value. | +
FromMatchesFilter | +Filter for packets where the "from" field exactly matches a specified JID. | +
IQTypeFilter | +A filter for IQ packet types. | +
MessageTypeFilter | +Filters for packets of a specific type of Message (e.g. | +
NotFilter | +Implements the logical NOT operation on a packet filter. | +
OrFilter | +Implements the logical OR operation over two or more packet filters. | +
PacketExtensionFilter | +Filters for packets with a particular type of packet extension. | +
PacketIDFilter | +Filters for packets with a particular packet ID. | +
PacketTypeFilter | +Filters for packets of a particular type. | +
ThreadFilter | +Filters for message packets with a particular thread value. | +
ToContainsFilter | +Filters for packets where the "to" field contains a specified value. | +
+Allows PacketCollector
and PacketListener
instances to filter for packets with particular attributes.
+
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Interfaces
+
+ +ConnectionEstablishedListener + +ConnectionListener + +PacketInterceptor + +PacketListener + +RosterListener |
+
+Classes
+
+ +AccountManager + +Chat + +ConnectionConfiguration + +GoogleTalkConnection + +GroupChat + +PacketCollector + +Roster + +RosterEntry + +RosterGroup + +SASLAuthentication + +SmackConfiguration + +SSLXMPPConnection + +XMPPConnection |
+
+Exceptions
+
+ +XMPPException |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
ConnectionEstablishedListener | +Interface that allows for implementing classes to listen for connection established + events. | +
ConnectionListener | +Interface that allows for implementing classes to listen for connection closing + events. | +
PacketInterceptor | +Provides a mechanism to intercept and modify packets that are going to be + sent to the server. | +
PacketListener | +Provides a mechanism to listen for packets that pass a specified filter. | +
RosterListener | +A listener that is fired any time a roster is changed or the presence of + a user in the roster is changed. | +
+ +
+Class Summary | +|
---|---|
AccountManager | +Allows creation and management of accounts on an XMPP server. | +
Chat | +A chat is a series of messages sent between two users. | +
ConnectionConfiguration | +Configuration to use while establishing the connection to the server. | +
GoogleTalkConnection | +Convenience class to make it easier to connect to the Google Talk IM service. | +
GroupChat | +A GroupChat is a conversation that takes place among many users in a virtual + room. | +
PacketCollector | +Provides a mechanism to collect packets into a result queue that pass a + specified filter. | +
Roster | +Represents a user's roster, which is the collection of users a person receives + presence updates for. | +
RosterEntry | +Each user in your roster is represented by a roster entry, which contains the user's + JID and a name or nickname you assign. | +
RosterGroup | +A group of roster entries. | +
SASLAuthentication | +This class is responsible authenticating the user using SASL, binding the resource + to the connection and establishing a session with the server. | +
SmackConfiguration | +Represents the configuration of Smack. | +
SSLXMPPConnection | +Creates an SSL connection to a XMPP server using the legacy dedicated SSL port + mechanism. | +
XMPPConnection | +Creates a connection to a XMPP server. | +
+ +
+Exception Summary | +|
---|---|
XMPPException | +A generic exception that is thrown when an error occurs performing an + XMPP operation. | +
+Core classes of the Smack API. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smack.packet.Authentication +
public class Authentication
+Authentication packet, which can be used to login to a XMPP server as well + as discover login information from the server. +
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Authentication()
+
++ Create a new authentication packet. |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getDigest()
+
++ Returns the password digest or null if the digest hasn't + been set. |
+
+ String |
+getPassword()
+
++ Returns the plain text password or null if the password hasn't + been set. |
+
+ String |
+getResource()
+
++ Returns the resource or null if the resource hasn't been set. |
+
+ String |
+getUsername()
+
++ Returns the username, or null if the username hasn't been sent. |
+
+ void |
+setDigest(String digest)
+
++ Sets the digest value directly. |
+
+ void |
+setDigest(String connectionID,
+ String password)
+
++ Sets the digest value using a connection ID and password. |
+
+ void |
+setPassword(String password)
+
++ Sets the plain text password. |
+
+ void |
+setResource(String resource)
+
++ Sets the resource. |
+
+ void |
+setUsername(String username)
+
++ Sets the username. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Authentication()+
setType(IQ.Type.GET); +
+
+Method Detail | +
---|
+public String getUsername()+
+
+public void setUsername(String username)+
+
username
- the username.+public String getPassword()+
+
+public void setPassword(String password)+
+
password
- the password.+public String getDigest()+
+
+public void setDigest(String connectionID, + String password)+
+
connectionID
- the connection ID.password
- the password.XMPPConnection.getConnectionID()
+public void setDigest(String digest)+
+
digest
- the digest, which is the SHA-1 hash of the connection ID
+ the user's password, encoded as hex.XMPPConnection.getConnectionID()
+public String getResource()+
+
+public void setResource(String resource)+
+
resource
- the resource.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smack.packet.Bind +
public class Bind
+IQ packet used by Smack to bind a resource and to obtain the jid assigned by the server. + There are two ways to bind a resource. One is simply sending an empty Bind packet where the + server will assign a new resource for this connection. The other option is to set a desired + resource but the server may return a modified version of the sent resource.
+ + For more information refer to the following + link. +
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Bind()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getJid()
+
++ |
+
+ String |
+getResource()
+
++ |
+
+ void |
+setJid(String jid)
+
++ |
+
+ void |
+setResource(String resource)
+
++ |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Bind()+
+Method Detail | +
---|
+public String getResource()+
+public void setResource(String resource)+
+public String getJid()+
+public void setJid(String jid)+
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.DefaultPacketExtension +
public class DefaultPacketExtension
+Default implementation of the PacketExtension interface. Unless a PacketExtensionProvider
+ is registered with ProviderManager
,
+ instances of this class will be returned when getting packet extensions.
+ + This class provides a very simple representation of an XML sub-document. Each element + is a key in a Map with its CDATA being the value. For example, given the following + XML sub-document: + +
+ <foo xmlns="http://bar.com"> + <color>blue</color> + <food>pizza</food> + </foo>+ + In this case, getValue("color") would return "blue", and getValue("food") would + return "pizza". This parsing mechanism mechanism is very simplistic and will not work + as desired in all cases (for example, if some of the elements have attributes. In those + cases, a custom PacketExtensionProvider should be used. +
+ +
+
+Constructor Summary | +|
---|---|
DefaultPacketExtension(String elementName,
+ String namespace)
+
++ Creates a new generic packet extension. |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the XML element name of the extension sub-packet root element. |
+
+ Iterator |
+getNames()
+
++ Returns an Iterator for the names that can be used to get + values of the packet extension. |
+
+ String |
+getNamespace()
+
++ Returns the XML namespace of the extension sub-packet root element. |
+
+ String |
+getValue(String name)
+
++ Returns a packet extension value given a name. |
+
+ void |
+setValue(String name,
+ String value)
+
++ Sets a packet extension value using the given name. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DefaultPacketExtension(String elementName, + String namespace)+
+
elementName
- the name of the element of the XML sub-document.namespace
- the namespace of the element.+Method Detail | +
---|
+public String getElementName()+
+
getElementName
in interface PacketExtension
+public String getNamespace()+
+
getNamespace
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+public Iterator getNames()+
+
+public String getValue(String name)+
+
name
- the name.
++public void setValue(String name, + String value)+
+
name
- the name.value
- the value.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.IQ.Type +
public static class IQ.Type
+A class to represent the type of the IQ packet. The types are: + +
+ +
+
+Field Summary | +|
---|---|
+static IQ.Type |
+ERROR
+
++ |
+
+static IQ.Type |
+GET
+
++ |
+
+static IQ.Type |
+RESULT
+
++ |
+
+static IQ.Type |
+SET
+
++ |
+
+Method Summary | +|
---|---|
+static IQ.Type |
+fromString(String type)
+
++ Converts a String into the corresponding types. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static final IQ.Type GET+
+public static final IQ.Type SET+
+public static final IQ.Type RESULT+
+public static final IQ.Type ERROR+
+Method Detail | +
---|
+public static IQ.Type fromString(String type)+
+
type
- the String value to covert.
++public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
public abstract class IQ
+The base IQ (Info/Query) packet. IQ packets are used to get and set information + on the server, including authentication, roster operations, and creating + accounts. Each IQ packet has a specific type that indicates what type of action + is being taken: "get", "set", "result", or "error".
+ + IQ packets can contain a single child element that exists in a specific XML + namespace. The combination of the element name and namespace determines what + type of IQ packet it is. Some example IQ subpacket snippets:
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+IQ.Type
+
++ A class to represent the type of the IQ packet. |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
IQ()
+
++ |
+
+Method Summary | +|
---|---|
+abstract String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ IQ.Type |
+getType()
+
++ Returns the type of the IQ packet. |
+
+ void |
+setType(IQ.Type type)
+
++ Sets the type of the IQ packet. |
+
+ String |
+toXML()
+
++ Returns the packet as XML. |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public IQ()+
+Method Detail | +
---|
+public IQ.Type getType()+
+
+public void setType(IQ.Type type)+
+
type
- the type of the IQ packet.+public String toXML()+
Packet
+
toXML
in class Packet
+public abstract String getChildElementXML()+
+ + Extensions of this class must override this method. +
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Message.Type +
public static class Message.Type
+Represents the type of a message. +
+ +
+
+Field Summary | +|
---|---|
+static Message.Type |
+CHAT
+
++ Typically short text message used in line-by-line chat interfaces. |
+
+static Message.Type |
+ERROR
+
++ indicates a messaging error. |
+
+static Message.Type |
+GROUP_CHAT
+
++ Chat message sent to a groupchat server for group chats. |
+
+static Message.Type |
+HEADLINE
+
++ Text message to be displayed in scrolling marquee displays. |
+
+static Message.Type |
+NORMAL
+
++ (Default) a normal text message used in email like interface. |
+
+Method Summary | +|
---|---|
+static Message.Type |
+fromString(String type)
+
++ Converts a String value into its Type representation. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static final Message.Type NORMAL+
+
+public static final Message.Type CHAT+
+
+public static final Message.Type GROUP_CHAT+
+
+public static final Message.Type HEADLINE+
+
+public static final Message.Type ERROR+
+
+Method Detail | +
---|
+public static Message.Type fromString(String type)+
+
type
- the String value.
++public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.Message +
public class Message
+Represents XMPP message packets. A message can be one of several types: + +
+
Message type | |||||
Field | Normal | Chat | Group Chat | Headline | XMPPError |
subject | SHOULD | SHOULD NOT | SHOULD NOT | SHOULD NOT | SHOULD NOT |
thread | OPTIONAL | SHOULD | OPTIONAL | OPTIONAL | SHOULD NOT |
body | SHOULD | SHOULD | SHOULD | SHOULD | SHOULD NOT |
error | MUST NOT | MUST NOT | MUST NOT | MUST NOT | MUST |
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+Message.Type
+
++ Represents the type of a message. |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Message()
+
++ Creates a new, "normal" message. |
+|
Message(String to)
+
++ Creates a new "normal" message to the specified recipient. |
+|
Message(String to,
+ Message.Type type)
+
++ Creates a new message of the specified type to a recipient. |
+
+Method Summary | +|
---|---|
+ String |
+getBody()
+
++ Returns the body of the message, or null if the body has not been set. |
+
+ String |
+getSubject()
+
++ Returns the subject of the message, or null if the subject has not been set. |
+
+ String |
+getThread()
+
++ Returns the thread id of the message, which is a unique identifier for a sequence + of "chat" messages. |
+
+ Message.Type |
+getType()
+
++ Returns the type of the message. |
+
+ void |
+setBody(String body)
+
++ Sets the body of the message. |
+
+ void |
+setSubject(String subject)
+
++ Sets the subject of the message. |
+
+ void |
+setThread(String thread)
+
++ Sets the thread id of the message, which is a unique identifier for a sequence + of "chat" messages. |
+
+ void |
+setType(Message.Type type)
+
++ Sets the type of the message. |
+
+ String |
+toXML()
+
++ Returns the packet as XML. |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Message()+
+
+public Message(String to)+
+
to
- the recipient of the message.+public Message(String to, + Message.Type type)+
+
to
- the user to send the message to.type
- the message type.+Method Detail | +
---|
+public Message.Type getType()+
+
+public void setType(Message.Type type)+
+
type
- the type of the message.+public String getSubject()+
+
+public void setSubject(String subject)+
+
subject
- the subject of the message.+public String getBody()+
+
+public void setBody(String body)+
+
body
- +public String getThread()+
+
+public void setThread(String thread)+
+
thread
- the thread id of the message.+public String toXML()+
Packet
+
toXML
in class Packet
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
public abstract class Packet
+Base class for XMPP packets. Every packet has a unique ID (which is automatically + generated, but can be overriden). Optionally, the "to" and "from" fields can be set, + as well as an arbitrary number of properties. + + Properties provide an easy mechanism for clients to share data. Each property has a + String name, and a value that is a Java primitive (int, long, float, double, boolean) + or any Serializable object (a Java object is Serializable when it implements the + Serializable interface). +
+ +
+
+Field Summary | +|
---|---|
+static String |
+ID_NOT_AVAILABLE
+
++ Constant used as packetID to indicate that a packet has no id. |
+
+Constructor Summary | +|
---|---|
Packet()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addExtension(PacketExtension extension)
+
++ Adds a packet extension to the packet. |
+
+ void |
+deleteProperty(String name)
+
++ Deletes a property. |
+
+ XMPPError |
+getError()
+
++ Returns the error associated with this packet, or null if there are + no errors. |
+
+ PacketExtension |
+getExtension(String elementName,
+ String namespace)
+
++ Returns the first packet extension that matches the specified element name and + namespace, or null if it doesn't exist. |
+
+ Iterator |
+getExtensions()
+
++ Returns an Iterator for the packet extensions attached to the packet. |
+
+protected String |
+getExtensionsXML()
+
++ Returns the extension sub-packets (including properties data) as an XML + String, or the Empty String if there are no packet extensions. |
+
+ String |
+getFrom()
+
++ Returns who the packet is being sent "from" or null if + the value is not set. |
+
+ String |
+getPacketID()
+
++ Returns the unique ID of the packet. |
+
+ Object |
+getProperty(String name)
+
++ Returns the packet property with the specified name or null if the + property doesn't exist. |
+
+ Iterator |
+getPropertyNames()
+
++ Returns an Iterator for all the property names that are set. |
+
+ String |
+getTo()
+
++ Returns who the packet is being sent "to", or null if + the value is not set. |
+
+ void |
+removeExtension(PacketExtension extension)
+
++ Removes a packet extension from the packet. |
+
+ void |
+setError(XMPPError error)
+
++ Sets the error for this packet. |
+
+ void |
+setFrom(String from)
+
++ Sets who the packet is being sent "from". |
+
+ void |
+setPacketID(String packetID)
+
++ Sets the unique ID of the packet. |
+
+ void |
+setProperty(String name,
+ boolean value)
+
++ Sets a packet property with a bboolean value. |
+
+ void |
+setProperty(String name,
+ double value)
+
++ Sets a packet property with a double value. |
+
+ void |
+setProperty(String name,
+ float value)
+
++ Sets a packet property with a float value. |
+
+ void |
+setProperty(String name,
+ int value)
+
++ Sets a packet property with an int value. |
+
+ void |
+setProperty(String name,
+ long value)
+
++ Sets a packet property with a long value. |
+
+ void |
+setProperty(String name,
+ Object value)
+
++ Sets a property with an Object as the value. |
+
+ void |
+setTo(String to)
+
++ Sets who the packet is being sent "to". |
+
+abstract String |
+toXML()
+
++ Returns the packet as XML. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String ID_NOT_AVAILABLE+
+
+Constructor Detail | +
---|
+public Packet()+
+Method Detail | +
---|
+public String getPacketID()+
+
+public void setPacketID(String packetID)+
+
packetID
- the unique ID for the packet.+public String getTo()+
+
+public void setTo(String to)+
+
to
- who the packet is being sent to.+public String getFrom()+
+
+public void setFrom(String from)+
+
from
- who the packet is being sent to.+public XMPPError getError()+
+
+public void setError(XMPPError error)+
+
error
- the error to associate with this packet.+public Iterator getExtensions()+
+
+public PacketExtension getExtension(String elementName, + String namespace)+
ProviderManager
+ class to handle custom parsing. In that case, the type of the Object
+ will be determined by the provider.
++
elementName
- the XML element name of the packet extension.namespace
- the XML element namespace of the packet extension.
++public void addExtension(PacketExtension extension)+
+
extension
- a packet extension.+public void removeExtension(PacketExtension extension)+
+
extension
- the packet extension to remove.+public Object getProperty(String name)+
+
name
- the name of the property.
++public void setProperty(String name, + int value)+
+
name
- the name of the property.value
- the value of the property.+public void setProperty(String name, + long value)+
+
name
- the name of the property.value
- the value of the property.+public void setProperty(String name, + float value)+
+
name
- the name of the property.value
- the value of the property.+public void setProperty(String name, + double value)+
+
name
- the name of the property.value
- the value of the property.+public void setProperty(String name, + boolean value)+
+
name
- the name of the property.value
- the value of the property.+public void setProperty(String name, + Object value)+
+
name
- the name of the property.value
- the value of the property.+public void deleteProperty(String name)+
+
name
- the name of the property to delete.+public Iterator getPropertyNames()+
+
+public abstract String toXML()+
+
+protected String getExtensionsXML()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface PacketExtension
+Interface to represent packet extensions. A packet extension is an XML subdocument + with a root element name and namespace. Packet extensions are used to provide + extended functionality beyond what is in the base XMPP specification. Examples of + packet extensions include message events, message properties, and extra presence data. + IQ packets cannot contain packet extensions. +
+ +
+
DefaultPacketExtension
,
+PacketExtensionProvider
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
+Method Detail | +
---|
+String getElementName()+
+
+String getNamespace()+
+
+String toXML()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Presence.Mode +
public static class Presence.Mode
+A typsafe enum class to represent the presence mode. +
+ +
+
+Field Summary | +|
---|---|
+static Presence.Mode |
+AVAILABLE
+
++ |
+
+static Presence.Mode |
+AWAY
+
++ |
+
+static Presence.Mode |
+CHAT
+
++ |
+
+static Presence.Mode |
+DO_NOT_DISTURB
+
++ |
+
+static Presence.Mode |
+EXTENDED_AWAY
+
++ |
+
+static Presence.Mode |
+INVISIBLE
+
++ |
+
+Method Summary | +|
---|---|
+static Presence.Mode |
+fromString(String value)
+
++ Returns the mode constant associated with the String value. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static final Presence.Mode AVAILABLE+
+public static final Presence.Mode CHAT+
+public static final Presence.Mode AWAY+
+public static final Presence.Mode EXTENDED_AWAY+
+public static final Presence.Mode DO_NOT_DISTURB+
+public static final Presence.Mode INVISIBLE+
+Method Detail | +
---|
+public String toString()+
toString
in class Object
+public static Presence.Mode fromString(String value)+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Presence.Type +
public static class Presence.Type
+A typsafe enum class to represent the presecence type. +
+ +
+
+Field Summary | +|
---|---|
+static Presence.Type |
+AVAILABLE
+
++ |
+
+static Presence.Type |
+ERROR
+
++ |
+
+static Presence.Type |
+SUBSCRIBE
+
++ |
+
+static Presence.Type |
+SUBSCRIBED
+
++ |
+
+static Presence.Type |
+UNAVAILABLE
+
++ |
+
+static Presence.Type |
+UNSUBSCRIBE
+
++ |
+
+static Presence.Type |
+UNSUBSCRIBED
+
++ |
+
+Method Summary | +|
---|---|
+static Presence.Type |
+fromString(String value)
+
++ Returns the type constant associated with the String value. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static final Presence.Type AVAILABLE+
+public static final Presence.Type UNAVAILABLE+
+public static final Presence.Type SUBSCRIBE+
+public static final Presence.Type SUBSCRIBED+
+public static final Presence.Type UNSUBSCRIBE+
+public static final Presence.Type UNSUBSCRIBED+
+public static final Presence.Type ERROR+
+Method Detail | +
---|
+public String toString()+
toString
in class Object
+public static Presence.Type fromString(String value)+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.Presence +
public class Presence
+Represents XMPP presence packets. Every presence packet has a type, which is one of + the following values: +
+ + A number of attributes are optional: +
+ + Presence packets are used for two purposes. First, to notify the server of our + the clients current presence status. Second, they are used to subscribe and + unsubscribe users from the roster. +
+ +
+
RosterPacket
+Nested Class Summary | +|
---|---|
+static class |
+Presence.Mode
+
++ A typsafe enum class to represent the presence mode. |
+
+static class |
+Presence.Type
+
++ A typsafe enum class to represent the presecence type. |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Presence(Presence.Type type)
+
++ Creates a new presence update. |
+|
Presence(Presence.Type type,
+ String status,
+ int priority,
+ Presence.Mode mode)
+
++ Creates a new presence update with a specified status, priority, and mode. |
+
+Method Summary | +|
---|---|
+ Presence.Mode |
+getMode()
+
++ Returns the mode of the presence update. |
+
+ int |
+getPriority()
+
++ Returns the priority of the presence, or -1 if no priority has been set. |
+
+ String |
+getStatus()
+
++ Returns the status message of the presence update, or null if there + is not a status. |
+
+ Presence.Type |
+getType()
+
++ Returns the type of this presence packet. |
+
+ void |
+setMode(Presence.Mode mode)
+
++ Sets the mode of the presence update. |
+
+ void |
+setPriority(int priority)
+
++ Sets the priority of the presence. |
+
+ void |
+setStatus(String status)
+
++ Sets the status message of the presence update. |
+
+ void |
+setType(Presence.Type type)
+
++ Sets the type of the presence packet. |
+
+ String |
+toString()
+
++ |
+
+ String |
+toXML()
+
++ Returns the packet as XML. |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Presence(Presence.Type type)+
+
type
- the type.+public Presence(Presence.Type type, + String status, + int priority, + Presence.Mode mode)+
+
type
- the type.status
- a text message describing the presence update.priority
- the priority of this presence update.mode
- the mode type for this presence update.+Method Detail | +
---|
+public Presence.Type getType()+
+
+public void setType(Presence.Type type)+
+
type
- the type of the presence packet.+public String getStatus()+
+
+public void setStatus(String status)+
+
status
- the status message.+public int getPriority()+
+
+public void setPriority(int priority)+
+
priority
- the priority of the presence.
+IllegalArgumentException
- if the priority is outside the valid range.+public Presence.Mode getMode()+
+
+public void setMode(Presence.Mode mode)+
+
mode
- the mode.+public String toXML()+
Packet
+
toXML
in class Packet
+public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smack.packet.Registration +
public class Registration
+Represents registration packets. An empty GET query will cause the server to return information + about it's registration support. SET queries can be used to create accounts or update + existing account information. XMPP servers may require a number of attributes to be set + when creating a new account. The standard account attributes are as follows: +
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Registration()
+
++ |
+
+Method Summary | +|
---|---|
+ Map |
+getAttributes()
+
++ Returns the map of String key/value pairs of account attributes. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getInstructions()
+
++ Returns the registration instructions, or null if no instructions + have been set. |
+
+ void |
+setAttributes(Map attributes)
+
++ Sets the account attributes. |
+
+ void |
+setInstructions(String instructions)
+
++ Sets the registration instructions. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Registration()+
+Method Detail | +
---|
+public String getInstructions()+
+
+public void setInstructions(String instructions)+
+
instructions
- the registration instructions.+public Map getAttributes()+
+
+public void setAttributes(Map attributes)+
+
attributes
- the account attributes.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.RosterPacket.Item +
public static class RosterPacket.Item
+A roster item, which consists of a JID, their name, the type of subscription, and + the groups the roster item belongs to. +
+ +
+
+Constructor Summary | +|
---|---|
RosterPacket.Item(String user,
+ String name)
+
++ Creates a new roster item. |
+
+Method Summary | +|
---|---|
+ void |
+addGroupName(String groupName)
+
++ Adds a group name. |
+
+ Iterator |
+getGroupNames()
+
++ Returns an Iterator for the group names (as Strings) that the roster item + belongs to. |
+
+ RosterPacket.ItemStatus |
+getItemStatus()
+
++ Returns the roster item status. |
+
+ RosterPacket.ItemType |
+getItemType()
+
++ Returns the roster item type. |
+
+ String |
+getName()
+
++ Returns the user's name. |
+
+ String |
+getUser()
+
++ Returns the user. |
+
+ void |
+removeGroupName(String groupName)
+
++ Removes a group name. |
+
+ void |
+setItemStatus(RosterPacket.ItemStatus itemStatus)
+
++ Sets the roster item status. |
+
+ void |
+setItemType(RosterPacket.ItemType itemType)
+
++ Sets the roster item type. |
+
+ void |
+setName(String name)
+
++ Sets the user's name. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public RosterPacket.Item(String user, + String name)+
+
user
- the user.name
- the user's name.+Method Detail | +
---|
+public String getUser()+
+
+public String getName()+
+
+public void setName(String name)+
+
name
- the user's name.+public RosterPacket.ItemType getItemType()+
+
+public void setItemType(RosterPacket.ItemType itemType)+
+
itemType
- the roster item type.+public RosterPacket.ItemStatus getItemStatus()+
+
+public void setItemStatus(RosterPacket.ItemStatus itemStatus)+
+
itemStatus
- the roster item status.+public Iterator getGroupNames()+
+
+public void addGroupName(String groupName)+
+
groupName
- the group name.+public void removeGroupName(String groupName)+
+
groupName
- the group name.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.RosterPacket.ItemStatus +
public static class RosterPacket.ItemStatus
+The subscription status of a roster item. An optional element that indicates + the subscription status if a change request is pending. +
+ +
+
+Field Summary | +|
---|---|
+static RosterPacket.ItemStatus |
+SUBSCRIPTION_PENDING
+
++ Request to subcribe. |
+
+static RosterPacket.ItemStatus |
+UNSUBCRIPTION_PENDING
+
++ Request to unsubscribe. |
+
+Method Summary | +|
---|---|
+static RosterPacket.ItemStatus |
+fromString(String value)
+
++ |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static final RosterPacket.ItemStatus SUBSCRIPTION_PENDING+
+
+public static final RosterPacket.ItemStatus UNSUBCRIPTION_PENDING+
+
+Method Detail | +
---|
+public static RosterPacket.ItemStatus fromString(String value)+
+public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.RosterPacket.ItemType +
public static class RosterPacket.ItemType
+The subscription type of a roster item. +
+ +
+
+Field Summary | +|
---|---|
+static RosterPacket.ItemType |
+BOTH
+
++ The user and subscriber have a mutual interest in each other's presence. |
+
+static RosterPacket.ItemType |
+FROM
+
++ The subscriber is interested in receiving presence updates from the user. |
+
+static RosterPacket.ItemType |
+NONE
+
++ The user and subscriber have no interest in each other's presence. |
+
+static RosterPacket.ItemType |
+REMOVE
+
++ The user wishes to stop receiving presence updates from the subscriber. |
+
+static RosterPacket.ItemType |
+TO
+
++ The user is interested in receiving presence updates from the subscriber. |
+
+Constructor Summary | +|
---|---|
RosterPacket.ItemType(String value)
+
++ Returns the item type associated with the specified string. |
+
+Method Summary | +|
---|---|
+static RosterPacket.ItemType |
+fromString(String value)
+
++ |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static final RosterPacket.ItemType NONE+
+
+public static final RosterPacket.ItemType TO+
+
+public static final RosterPacket.ItemType FROM+
+
+public static final RosterPacket.ItemType BOTH+
+
+public static final RosterPacket.ItemType REMOVE+
+
+Constructor Detail | +
---|
+public RosterPacket.ItemType(String value)+
+
value
- the item type.+Method Detail | +
---|
+public static RosterPacket.ItemType fromString(String value)+
+public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smack.packet.RosterPacket +
public class RosterPacket
+Represents XMPP roster packets. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+RosterPacket.Item
+
++ A roster item, which consists of a JID, their name, the type of subscription, and + the groups the roster item belongs to. |
+
+static class |
+RosterPacket.ItemStatus
+
++ The subscription status of a roster item. |
+
+static class |
+RosterPacket.ItemType
+
++ The subscription type of a roster item. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
RosterPacket()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addRosterItem(RosterPacket.Item item)
+
++ Adds a roster item to the packet. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ int |
+getRosterItemCount()
+
++ Returns the number of roster items in this roster packet. |
+
+ Iterator |
+getRosterItems()
+
++ Returns an Iterator for the roster items in the packet. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public RosterPacket()+
+Method Detail | +
---|
+public void addRosterItem(RosterPacket.Item item)+
+
item
- a roster item.+public int getRosterItemCount()+
+
+public Iterator getRosterItems()+
+
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smack.packet.Session +
public class Session
+IQ packet that will be sent to the server to establish a session.
+ + If a server supports sessions, it MUST include a session element in the + stream features it advertises to a client after the completion of stream authentication. + Upon being informed that session establishment is required by the server the client MUST + establish a session if it desires to engage in instant messaging and presence functionality.
+ + For more information refer to the following + link. +
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Session()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Session()+
+Method Detail | +
---|
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.StreamError +
public class StreamError
+Represents a stream error packet. Stream errors are unrecoverable errors where the server + will close the unrelying TCP connection after the stream error was sent to the client. + These is the list of stream errors as defined in the XMPP spec:
+ +
Code | Description |
bad-format | the entity has sent XML that cannot be processed |
unsupported-encoding | the entity has sent a namespace prefix that is + unsupported |
bad-namespace-prefix | Remote Server Timeout |
conflict | the server is closing the active stream for this entity + because a new stream has been initiated that conflicts with the existing + stream. |
connection-timeout | the entity has not generated any traffic over + the stream for some period of time. |
host-gone | the value of the 'to' attribute provided by the initiating + entity in the stream header corresponds to a hostname that is no longer hosted by + the server. |
host-unknown | the value of the 'to' attribute provided by the + initiating entity in the stream header does not correspond to a hostname that is + hosted by the server. |
improper-addressing | a stanza sent between two servers lacks a 'to' + or 'from' attribute |
internal-server-error | the server has experienced a + misconfiguration. |
invalid-from | the JID or hostname provided in a 'from' address does + not match an authorized JID. |
invalid-id | the stream ID or dialback ID is invalid or does not match + an ID previously provided. |
invalid-namespace | the streams namespace name is invalid. |
invalid-xml | the entity has sent invalid XML over the stream. |
not-authorized | the entity has attempted to send data before the + stream has been authenticated |
policy-violation | the entity has violated some local service + policy. |
remote-connection-failed | Rthe server is unable to properly connect + to a remote entity. |
resource-constraint | Rthe server lacks the system resources necessary + to service the stream. |
restricted-xml | the entity has attempted to send restricted XML + features. |
see-other-host | the server will not provide service to the initiating + entity but is redirecting traffic to another host. |
system-shutdown | the server is being shut down and all active streams + are being closed. |
undefined-condition | the error condition is not one of those defined + by the other conditions in this list. |
unsupported-encoding | the initiating entity has encoded the stream in + an encoding that is not supported. |
unsupported-stanza-type | the initiating entity has sent a first-level + child of the stream that is not supported. |
unsupported-version | the value of the 'version' attribute provided by + the initiating entity in the stream header specifies a version of XMPP that is not + supported. |
xml-not-well-formed | the initiating entity has sent XML that is + not well-formed. |
+ +
+
+Constructor Summary | +|
---|---|
StreamError(String code)
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getCode()
+
++ Returns the error code. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StreamError(String code)+
+Method Detail | +
---|
+public String getCode()+
+
+public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.XMPPError +
public class XMPPError
+Represents a XMPP error sub-packet. Typically, a server responds to a request that has + problems by sending the packet back and including an error packet. Each error has a code + as well as as an optional text explanation. Typical error codes are as follows:
+ +
Code | Description |
302 | Redirect |
400 | Bad Request |
401 | Unauthorized |
402 | Payment Required |
403 | Forbidden |
404 | Not Found |
405 | Not Allowed |
406 | Not Acceptable |
407 | Registration Required |
408 | Request Timeout |
409 | Conflict |
500 | Internal Server XMPPError |
501 | Not Implemented |
502 | Remote Server Error |
503 | Service Unavailable |
504 | Remote Server Timeout |
+ +
+
+Constructor Summary | +|
---|---|
XMPPError(int code)
+
++ Creates a new error with the specified code and no message.. |
+|
XMPPError(int code,
+ String message)
+
++ Creates a new error with the specified code and message. |
+
+Method Summary | +|
---|---|
+ int |
+getCode()
+
++ Returns the error code. |
+
+ String |
+getMessage()
+
++ Returns the message describing the error, or null if there is no message. |
+
+ String |
+toString()
+
++ |
+
+ String |
+toXML()
+
++ Returns the error as XML. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public XMPPError(int code)+
+
code
- the error code.+public XMPPError(int code, + String message)+
+
code
- the error code.message
- a message describing the error.+Method Detail | +
---|
+public int getCode()+
+
+public String getMessage()+
+
+public String toXML()+
+
+public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +PacketExtension |
+
+Classes
+
+ +Authentication + +Bind + +DefaultPacketExtension + +IQ + +IQ.Type + +Message + +Message.Type + +Packet + +Presence + +Presence.Mode + +Presence.Type + +Registration + +RosterPacket + +RosterPacket.Item + +RosterPacket.ItemStatus + +RosterPacket.ItemType + +Session + +StreamError + +XMPPError |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
PacketExtension | +Interface to represent packet extensions. | +
+ +
+Class Summary | +|
---|---|
Authentication | +Authentication packet, which can be used to login to a XMPP server as well + as discover login information from the server. | +
Bind | +IQ packet used by Smack to bind a resource and to obtain the jid assigned by the server. | +
DefaultPacketExtension | +Default implementation of the PacketExtension interface. | +
IQ | +The base IQ (Info/Query) packet. | +
IQ.Type | +A class to represent the type of the IQ packet. | +
Message | +Represents XMPP message packets. | +
Message.Type | +Represents the type of a message. | +
Packet | +Base class for XMPP packets. | +
Presence | +Represents XMPP presence packets. | +
Presence.Mode | +A typsafe enum class to represent the presence mode. | +
Presence.Type | +A typsafe enum class to represent the presecence type. | +
Registration | +Represents registration packets. | +
RosterPacket | +Represents XMPP roster packets. | +
RosterPacket.Item | +A roster item, which consists of a JID, their name, the type of subscription, and + the groups the roster item belongs to. | +
RosterPacket.ItemStatus | +The subscription status of a roster item. | +
RosterPacket.ItemType | +The subscription type of a roster item. | +
Session | +IQ packet that will be sent to the server to establish a session. | +
StreamError | +Represents a stream error packet. | +
XMPPError | +Represents a XMPP error sub-packet. | +
+XML packets that are part of the XMPP protocol. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface IQProvider
+An interface for parsing custom IQ packets. Each IQProvider must be registered with + the ProviderManager class for it to be used. Every implementation of this + interface must have a public, no-argument constructor. +
+ +
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
+Method Detail | +
---|
+IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface PacketExtensionProvider
+An interface for parsing custom packets extensions. Each PacketExtensionProvider must + be registered with the ProviderManager class for it to be used. Every implementation + of this interface must have a public, no-argument constructor. +
+ +
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse an extension sub-packet and create a PacketExtension instance. |
+
+Method Detail | +
---|
+PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.provider.ProviderManager +
public class ProviderManager
+Manages providers for parsing custom XML sub-documents of XMPP packets. Two types of + providers exist:
+ + By default, Smack only knows how to process IQ packets with sub-packets that + are in a few namespaces such as:
+ <?xml version="1.0"?> + <smackProviders> + <iqProvider> + <elementName>query</elementName> + <namespace>jabber:iq:time</namespace> + <className>org.jivesoftware.smack.packet.Time</className> + </iqProvider> + </smackProviders>+ + Each IQ provider is associated with an element name and a namespace. If multiple provider + entries attempt to register to handle the same namespace, the first entry loaded from the + classpath will take precedence. The IQ provider class can either implement the IQProvider + interface, or extend the IQ class. In the former case, each IQProvider is responsible for + parsing the raw XML stream to create an IQ instance. In the latter case, bean introspection + is used to try to automatically set properties of the IQ instance using the values found + in the IQ packet XML. For example, an XMPP time packet resembles the following: +
+ <iq type='result' to='joe@example.com' from='mary@example.com' id='time_1'> + <query xmlns='jabber:iq:time'> + <utc>20020910T17:58:35</utc> + <tz>MDT</tz> + <display>Tue Sep 10 12:58:35 2002</display> + </query> + </iq>+ + In order for this packet to be automatically mapped to the Time object listed in the + providers file above, it must have the methods setUtc(String), setTz(String), and + setDisplay(String). The introspection service will automatically try to convert the String + value from the XML into a boolean, int, long, float, double, or Class depending on the + type the IQ instance expects.
+ + A pluggable system for packet extensions, child elements in a custom namespace for + message and presence packets, also exists. Each extension provider + is registered with a name space in the smack.providers file as in the following example: + +
+ <?xml version="1.0"?> + <smackProviders> + <extensionProvider> + <elementName>x</elementName> + <namespace>jabber:iq:event</namespace> + <className>org.jivesoftware.smack.packet.MessageEvent</className> + </extensionProvider> + </smackProviders>+ + If multiple provider entries attempt to register to handle the same element name and namespace, + the first entry loaded from the classpath will take precedence. Whenever a packet extension + is found in a packet, parsing will be passed to the correct provider. Each provider + can either implement the PacketExtensionProvider interface or be a standard Java Bean. In + the former case, each extension provider is responsible for parsing the raw XML stream to + contruct an object. In the latter case, bean introspection is used to try to automatically + set the properties of the class using the values in the packet extension sub-element. When an + extension provider is not registered for an element name and namespace combination, Smack will + store all top-level elements of the sub-packet in DefaultPacketExtension object and then + attach it to the packet. +
+ +
+
+Method Summary | +|
---|---|
+static void |
+addExtensionProvider(String elementName,
+ String namespace,
+ Object provider)
+
++ Adds an extension provider with the specified element name and name space. |
+
+static void |
+addIQProvider(String elementName,
+ String namespace,
+ Object provider)
+
++ Adds an IQ provider (must be an instance of IQProvider or Class object that is an IQ) + with the specified element name and name space. |
+
+static Object |
+getExtensionProvider(String elementName,
+ String namespace)
+
++ Returns the packet extension provider registered to the specified XML element name + and namespace. |
+
+static Iterator |
+getExtensionProviders()
+
++ Returns an Iterator for all PacketExtensionProvider instances. |
+
+static Object |
+getIQProvider(String elementName,
+ String namespace)
+
++ Returns the IQ provider registered to the specified XML element name and namespace. |
+
+static Iterator |
+getIQProviders()
+
++ Returns an Iterator for all IQProvider instances. |
+
+static void |
+removeExtensionProvider(String elementName,
+ String namespace)
+
++ Removes an extension provider with the specified element name and namespace. |
+
+static void |
+removeIQProvider(String elementName,
+ String namespace)
+
++ Removes an IQ provider with the specified element name and namespace. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public static Object getIQProvider(String elementName, + String namespace)+
+ <iq type='result' to='joe@example.com' from='mary@example.com' id='time_1'> + <query xmlns='jabber:iq:time'> + <utc>20020910T17:58:35</utc> + <tz>MDT</tz> + <display>Tue Sep 10 12:58:35 2002</display> + </query> + </iq>+ +
Note: this method is generally only called by the internal Smack classes. +
+
elementName
- the XML element name.namespace
- the XML namespace.
++public static Iterator getIQProviders()+
+
+public static void addIQProvider(String elementName, + String namespace, + Object provider)+
+
elementName
- the XML element name.namespace
- the XML namespace.provider
- the IQ provider.+public static void removeIQProvider(String elementName, + String namespace)+
addIQProvider
method.
++
elementName
- the XML element name.namespace
- the XML namespace.+public static Object getExtensionProvider(String elementName, + String namespace)+
+ <message to='romeo@montague.net' id='message_1'> + <body>Art thou not Romeo, and a Montague?</body> + <x xmlns='jabber:x:event'> + <composing/> + </x> + </message>+ +
Note: this method is generally only called by the internal Smack classes. +
+
elementName
- namespace
-
++public static void addExtensionProvider(String elementName, + String namespace, + Object provider)+
+
elementName
- the XML element name.namespace
- the XML namespace.provider
- the extension provider.+public static void removeExtensionProvider(String elementName, + String namespace)+
addExtensionProvider
method.
++
elementName
- the XML element name.namespace
- the XML namespace.+public static Iterator getExtensionProviders()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +IQProvider + +PacketExtensionProvider |
+
+Classes
+
+ +ProviderManager |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
IQProvider | +An interface for parsing custom IQ packets. | +
PacketExtensionProvider | +An interface for parsing custom packets extensions. | +
+ +
+Class Summary | +|
---|---|
ProviderManager | +Manages providers for parsing custom XML sub-documents of XMPP packets. | +
+Provides pluggable parsing of incoming IQ's and packet extensions. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.sasl.SASLMechanism +
org.jivesoftware.smack.sasl.SASLAnonymous +
public class SASLAnonymous
+Implementation of the SASL ANONYMOUS mechanisn as defined by the + IETF draft + document. +
+ +
+
+Constructor Summary | +|
---|---|
SASLAnonymous(SASLAuthentication saslAuthentication)
+
++ |
+
+Method Summary | +|
---|---|
+protected String |
+getAuthenticationText(String username,
+ String host,
+ String password)
+
++ Returns the authentication text to include in the initial auth stanza + or null if nothing should be added. |
+
+protected String |
+getChallengeResponse(byte[] bytes)
+
++ Returns the response text to send answering the challenge sent by the server. |
+
+protected String |
+getName()
+
++ Returns the common name of the SASL mechanism. |
+
Methods inherited from class org.jivesoftware.smack.sasl.SASLMechanism | +
---|
authenticate, challengeReceived, getSASLAuthentication |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SASLAnonymous(SASLAuthentication saslAuthentication)+
+Method Detail | +
---|
+protected String getName()+
SASLMechanism
+
getName
in class SASLMechanism
+protected String getAuthenticationText(String username, + String host, + String password)+
SASLMechanism
+
getAuthenticationText
in class SASLMechanism
username
- the username of the user being authenticated.host
- the hostname where the user account resides.password
- the password of the user.
++protected String getChallengeResponse(byte[] bytes)+
SASLMechanism
+
getChallengeResponse
in class SASLMechanism
bytes
- the challenge sent by the server.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.sasl.SASLMechanism +
public abstract class SASLMechanism
+Base class for SASL mechanisms. Subclasses must implement three methods: +
getName()
-- returns the common name of the SASL mechanism.getAuthenticationText(String, String, String)
-- authentication text to include
+ in the initial auth stanza.getChallengeResponse(byte[])
-- to respond challenges made by the server.+ +
+
+Constructor Summary | +|
---|---|
SASLMechanism(SASLAuthentication saslAuthentication)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+authenticate(String username,
+ String host,
+ String password)
+
++ Builds and sends the auth stanza to the server. |
+
+ void |
+challengeReceived(String challenge)
+
++ The server is challenging the SASL mechanism for the stanza he just sent. |
+
+protected abstract String |
+getAuthenticationText(String username,
+ String host,
+ String password)
+
++ Returns the authentication text to include in the initial auth stanza + or null if nothing should be added. |
+
+protected abstract String |
+getChallengeResponse(byte[] bytes)
+
++ Returns the response text to send answering the challenge sent by the server. |
+
+protected abstract String |
+getName()
+
++ Returns the common name of the SASL mechanism. |
+
+protected SASLAuthentication |
+getSASLAuthentication()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SASLMechanism(SASLAuthentication saslAuthentication)+
+Method Detail | +
---|
+public void authenticate(String username, + String host, + String password) + throws IOException+
+
username
- the username of the user being authenticated.host
- the hostname where the user account resides.password
- the password of the user.
+IOException
- If a network error occures while authenticating.+public void challengeReceived(String challenge) + throws IOException+
+
challenge
- a base64 encoded string representing the challenge.
+IOException
+protected abstract String getChallengeResponse(byte[] bytes)+
+
bytes
- the challenge sent by the server.
++protected abstract String getName()+
+
+protected abstract String getAuthenticationText(String username, + String host, + String password)+
+
username
- the username of the user being authenticated.host
- the hostname where the user account resides.password
- the password of the user.
++protected SASLAuthentication getSASLAuthentication()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.sasl.SASLMechanism +
org.jivesoftware.smack.sasl.SASLPlainMechanism +
public class SASLPlainMechanism
+Implementation of the SASL PLAIN mechanisn as defined by the + IETF draft + document. +
+ +
+
+Constructor Summary | +|
---|---|
SASLPlainMechanism(SASLAuthentication saslAuthentication)
+
++ |
+
+Method Summary | +|
---|---|
+protected String |
+getAuthenticationText(String username,
+ String host,
+ String password)
+
++ Returns the authentication text to include in the initial auth stanza + or null if nothing should be added. |
+
+protected String |
+getChallengeResponse(byte[] bytes)
+
++ Returns the response text to send answering the challenge sent by the server. |
+
+protected String |
+getName()
+
++ Returns the common name of the SASL mechanism. |
+
Methods inherited from class org.jivesoftware.smack.sasl.SASLMechanism | +
---|
authenticate, challengeReceived, getSASLAuthentication |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SASLPlainMechanism(SASLAuthentication saslAuthentication)+
+Method Detail | +
---|
+protected String getName()+
SASLMechanism
+
getName
in class SASLMechanism
+protected String getAuthenticationText(String username, + String host, + String password)+
SASLMechanism
+
getAuthenticationText
in class SASLMechanism
username
- the username of the user being authenticated.host
- the hostname where the user account resides.password
- the password of the user.
++protected String getChallengeResponse(byte[] bytes)+
SASLMechanism
+
getChallengeResponse
in class SASLMechanism
bytes
- the challenge sent by the server.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +SASLAnonymous + +SASLMechanism + +SASLPlainMechanism |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Class Summary | +|
---|---|
SASLAnonymous | +Implementation of the SASL ANONYMOUS mechanisn as defined by the + IETF draft + document. | +
SASLMechanism | +Base class for SASL mechanisms. | +
SASLPlainMechanism | +Implementation of the SASL PLAIN mechanisn as defined by the + IETF draft + document. | +
+SASL Mechanisms. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.util.Cache +
public class Cache
+A specialized Map that is size-limited (using an LRU algorithm) and + has an optional expiration time for cache items. The Map is thread-safe.
+ + The algorithm for cache is as follows: a HashMap is maintained for fast + object lookup. Two linked lists are maintained: one keeps objects in the + order they are accessed from cache, the other keeps objects in the order + they were originally added to cache. When objects are added to cache, they + are first wrapped by a CacheObject which maintains the following pieces + of information:
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from interface java.util.Map | +
---|
Map.Entry<K,V> |
+
+Field Summary | +|
---|---|
+protected org.jivesoftware.smack.util.Cache.LinkedList |
+ageList
+
++ Linked list to maintain time that cache objects were initially added + to the cache, most recently added to oldest added. |
+
+protected long |
+cacheHits
+
++ Maintain the number of cache hits and misses. |
+
+protected long |
+cacheMisses
+
++ Maintain the number of cache hits and misses. |
+
+protected org.jivesoftware.smack.util.Cache.LinkedList |
+lastAccessedList
+
++ Linked list to maintain order that cache objects are accessed + in, most used to least used. |
+
+protected Map |
+map
+
++ The map the keys and values are stored in. |
+
+protected int |
+maxCacheSize
+
++ Maximum number of items the cache will hold. |
+
+protected long |
+maxLifetime
+
++ Maximum length of time objects can exist in cache before expiring. |
+
+Constructor Summary | +|
---|---|
Cache(int maxSize,
+ long maxLifetime)
+
++ Create a new cache and specify the maximum size of for the cache in + bytes, and the maximum lifetime of objects. |
+
+Method Summary | +|
---|---|
+ void |
+clear()
+
++ |
+
+ boolean |
+containsKey(Object key)
+
++ |
+
+ boolean |
+containsValue(Object value)
+
++ |
+
+protected void |
+cullCache()
+
++ Removes the least recently used elements if the cache size is greater than + or equal to the maximum allowed size until the cache is at least 10% empty. |
+
+protected void |
+deleteExpiredEntries()
+
++ Clears all entries out of cache where the entries are older than the + maximum defined age. |
+
+ Set |
+entrySet()
+
++ |
+
+ Object |
+get(Object key)
+
++ |
+
+ long |
+getCacheHits()
+
++ |
+
+ long |
+getCacheMisses()
+
++ |
+
+ int |
+getMaxCacheSize()
+
++ |
+
+ long |
+getMaxLifetime()
+
++ |
+
+ boolean |
+isEmpty()
+
++ |
+
+ Set |
+keySet()
+
++ |
+
+ Object |
+put(Object key,
+ Object value)
+
++ |
+
+ void |
+putAll(Map map)
+
++ |
+
+ Object |
+remove(Object key)
+
++ |
+
+ Object |
+remove(Object key,
+ boolean internal)
+
++ |
+
+ void |
+setMaxCacheSize(int maxCacheSize)
+
++ |
+
+ void |
+setMaxLifetime(long maxLifetime)
+
++ |
+
+ int |
+size()
+
++ |
+
+ Collection |
+values()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
Methods inherited from interface java.util.Map | +
---|
equals, hashCode |
+
+Field Detail | +
---|
+protected Map map+
+
+protected org.jivesoftware.smack.util.Cache.LinkedList lastAccessedList+
+
+protected org.jivesoftware.smack.util.Cache.LinkedList ageList+
+
+protected int maxCacheSize+
+
+protected long maxLifetime+
+
+protected long cacheHits+
+ + Keeping track of cache hits and misses lets one measure how efficient + the cache is; the higher the percentage of hits, the more efficient. +
+
+protected long cacheMisses+
+ + Keeping track of cache hits and misses lets one measure how efficient + the cache is; the higher the percentage of hits, the more efficient. +
+
+Constructor Detail | +
---|
+public Cache(int maxSize, + long maxLifetime)+
+
maxSize
- the maximum number of objects the cache will hold. -1
+ means the cache has no max size.maxLifetime
- the maximum amount of time (in ms) objects can exist in
+ cache before being deleted. -1 means objects never expire.+Method Detail | +
---|
+public Object put(Object key, + Object value)+
put
in interface Map
+public Object get(Object key)+
get
in interface Map
+public Object remove(Object key)+
remove
in interface Map
+public Object remove(Object key, + boolean internal)+
+public void clear()+
clear
in interface Map
+public int size()+
size
in interface Map
+public boolean isEmpty()+
isEmpty
in interface Map
+public Collection values()+
values
in interface Map
+public boolean containsKey(Object key)+
containsKey
in interface Map
+public void putAll(Map map)+
putAll
in interface Map
+public boolean containsValue(Object value)+
containsValue
in interface Map
+public Set entrySet()+
entrySet
in interface Map
+public Set keySet()+
keySet
in interface Map
+public long getCacheHits()+
+public long getCacheMisses()+
+public int getMaxCacheSize()+
+public void setMaxCacheSize(int maxCacheSize)+
+public long getMaxLifetime()+
+public void setMaxLifetime(long maxLifetime)+
+protected void deleteExpiredEntries()+
+
+protected void cullCache()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.util.DNSUtil.HostAddress +
public static class DNSUtil.HostAddress
+Encapsulates a hostname and port. +
+ +
+
+Method Summary | +|
---|---|
+ boolean |
+equals(Object o)
+
++ |
+
+ String |
+getHost()
+
++ Returns the hostname. |
+
+ int |
+getPort()
+
++ Returns the port. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Method Detail | +
---|
+public String getHost()+
+
+public int getPort()+
+
+public String toString()+
toString
in class Object
+public boolean equals(Object o)+
equals
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.util.DNSUtil +
public class DNSUtil
+Utilty class to perform DNS lookups for XMPP services. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+DNSUtil.HostAddress
+
++ Encapsulates a hostname and port. |
+
+Constructor Summary | +|
---|---|
DNSUtil()
+
++ |
+
+Method Summary | +|
---|---|
+static DNSUtil.HostAddress |
+resolveXMPPDomain(String domain)
+
++ Returns the host name and port that the specified XMPP server can be + reached at for client-to-server communication. |
+
+static DNSUtil.HostAddress |
+resolveXMPPServerDomain(String domain)
+
++ Returns the host name and port that the specified XMPP server can be + reached at for server-to-server communication. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DNSUtil()+
+Method Detail | +
---|
+public static DNSUtil.HostAddress resolveXMPPDomain(String domain)+
+ + As an example, a lookup for "example.com" may return "im.example.com:5269". +
+
domain
- the domain.
++public static DNSUtil.HostAddress resolveXMPPServerDomain(String domain)+
+ + As an example, a lookup for "example.com" may return "im.example.com:5269". +
+
domain
- the domain.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.io.Reader +
org.jivesoftware.smack.util.ObservableReader +
public class ObservableReader
+An ObservableReader is a wrapper on a Reader that notifies to its listeners when + reading character streams. +
+ +
+
+Field Summary | +
---|
Fields inherited from class java.io.Reader | +
---|
lock |
+
+Constructor Summary | +|
---|---|
ObservableReader(Reader wrappedReader)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addReaderListener(ReaderListener readerListener)
+
++ Adds a reader listener to this reader that will be notified when + new strings are read. |
+
+ void |
+close()
+
++ |
+
+ void |
+mark(int readAheadLimit)
+
++ |
+
+ boolean |
+markSupported()
+
++ |
+
+ int |
+read()
+
++ |
+
+ int |
+read(char[] cbuf)
+
++ |
+
+ int |
+read(char[] cbuf,
+ int off,
+ int len)
+
++ |
+
+ boolean |
+ready()
+
++ |
+
+ void |
+removeReaderListener(ReaderListener readerListener)
+
++ Removes a reader listener from this reader. |
+
+ void |
+reset()
+
++ |
+
+ long |
+skip(long n)
+
++ |
+
Methods inherited from class java.io.Reader | +
---|
read |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ObservableReader(Reader wrappedReader)+
+Method Detail | +
---|
+public int read(char[] cbuf, + int off, + int len) + throws IOException+
read
in class Reader
IOException
+public void close() + throws IOException+
close
in interface Closeable
close
in class Reader
IOException
+public int read() + throws IOException+
read
in class Reader
IOException
+public int read(char[] cbuf) + throws IOException+
read
in class Reader
IOException
+public long skip(long n) + throws IOException+
skip
in class Reader
IOException
+public boolean ready() + throws IOException+
ready
in class Reader
IOException
+public boolean markSupported()+
markSupported
in class Reader
+public void mark(int readAheadLimit) + throws IOException+
mark
in class Reader
IOException
+public void reset() + throws IOException+
reset
in class Reader
IOException
+public void addReaderListener(ReaderListener readerListener)+
+
readerListener
- a reader listener.+public void removeReaderListener(ReaderListener readerListener)+
+
readerListener
- a reader listener.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++java.io.Writer +
org.jivesoftware.smack.util.ObservableWriter +
public class ObservableWriter
+An ObservableWriter is a wrapper on a Writer that notifies to its listeners when + writing to character streams. +
+ +
+
+Field Summary | +
---|
Fields inherited from class java.io.Writer | +
---|
lock |
+
+Constructor Summary | +|
---|---|
ObservableWriter(Writer wrappedWriter)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addWriterListener(WriterListener writerListener)
+
++ Adds a writer listener to this writer that will be notified when + new strings are sent. |
+
+ void |
+close()
+
++ |
+
+ void |
+flush()
+
++ |
+
+ void |
+removeWriterListener(WriterListener writerListener)
+
++ Removes a writer listener from this writer. |
+
+ void |
+write(char[] cbuf)
+
++ |
+
+ void |
+write(char[] cbuf,
+ int off,
+ int len)
+
++ |
+
+ void |
+write(int c)
+
++ |
+
+ void |
+write(String str)
+
++ |
+
+ void |
+write(String str,
+ int off,
+ int len)
+
++ |
+
Methods inherited from class java.io.Writer | +
---|
append, append, append |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ObservableWriter(Writer wrappedWriter)+
+Method Detail | +
---|
+public void write(char[] cbuf, + int off, + int len) + throws IOException+
write
in class Writer
IOException
+public void flush() + throws IOException+
flush
in interface Flushable
flush
in class Writer
IOException
+public void close() + throws IOException+
close
in interface Closeable
close
in class Writer
IOException
+public void write(int c) + throws IOException+
write
in class Writer
IOException
+public void write(char[] cbuf) + throws IOException+
write
in class Writer
IOException
+public void write(String str) + throws IOException+
write
in class Writer
IOException
+public void write(String str, + int off, + int len) + throws IOException+
write
in class Writer
IOException
+public void addWriterListener(WriterListener writerListener)+
+
writerListener
- a writer listener.+public void removeWriterListener(WriterListener writerListener)+
+
writerListener
- a writer listener.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.util.PacketParserUtils +
public class PacketParserUtils
+Utility class that helps to parse packets. Any parsing packets method that must be shared + between many clients must be placed in this utility class. +
+ +
+
+Constructor Summary | +|
---|---|
PacketParserUtils()
+
++ |
+
+Method Summary | +|
---|---|
+static XMPPError |
+parseError(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses error sub-packets. |
+
+static Packet |
+parseMessage(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a message packet. |
+
+static PacketExtension |
+parsePacketExtension(String elementName,
+ String namespace,
+ org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a packet extension sub-packet. |
+
+static Presence |
+parsePresence(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a presence packet. |
+
+static Map |
+parseProperties(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse a properties sub-packet. |
+
+static Object |
+parseWithIntrospection(String elementName,
+ Class objectClass,
+ org.xmlpull.v1.XmlPullParser parser)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public PacketParserUtils()+
+Method Detail | +
---|
+public static Packet parseMessage(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parser
- the XML parser, positioned at the start of a message packet.
+Exception
- if an exception occurs while parsing the packet.+public static Presence parsePresence(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parser
- the XML parser, positioned at the start of a presence packet.
+Exception
- if an exception occurs while parsing the packet.+public static Map parseProperties(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parser
- the XML parser, positioned at the start of a properties sub-packet.
+Exception
- if an error occurs while parsing the properties.+public static XMPPError parseError(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parser
- the XML parser.
+Exception
- if an exception occurs while parsing the packet.+public static PacketExtension parsePacketExtension(String elementName, + String namespace, + org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
elementName
- the XML element name of the packet extension.namespace
- the XML namespace of the packet extension.parser
- the XML parser, positioned at the starting element of the extension.
+Exception
- if a parsing error occurs.+public static Object parseWithIntrospection(String elementName, + Class objectClass, + org.xmlpull.v1.XmlPullParser parser) + throws Exception+
Exception
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface ReaderListener
+Interface that allows for implementing classes to listen for string reading + events. Listeners are registered with ObservableReader objects. +
+ +
+
ObservableReader.addReaderListener(org.jivesoftware.smack.util.ReaderListener)
,
+ObservableReader.removeReaderListener(org.jivesoftware.smack.util.ReaderListener)
+Method Summary | +|
---|---|
+ void |
+read(String str)
+
++ Notification that the Reader has read a new string. |
+
+Method Detail | +
---|
+void read(String str)+
+
str
- the read String
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.util.StringUtils +
public class StringUtils
+A collection of utility methods for String objects. +
+ +
+
+Method Summary | +|
---|---|
+static byte[] |
+decodeBase64(String data)
+
++ Decodes a base64 String. |
+
+static String |
+encodeBase64(byte[] data)
+
++ Encodes a byte array into a base64 String. |
+
+static String |
+encodeBase64(String data)
+
++ Encodes a String as a base64 String. |
+
+static String |
+encodeHex(byte[] bytes)
+
++ Encodes an array of bytes as String representation of hexadecimal. |
+
+static String |
+escapeForXML(String string)
+
++ Escapes all necessary characters in the String so that it can be used + in an XML doc. |
+
+static String |
+hash(String data)
+
++ Hashes a String using the SHA-1 algorithm and returns the result as a + String of hexadecimal numbers. |
+
+static String |
+parseBareAddress(String XMPPAddress)
+
++ Returns the XMPP address with any resource information removed. |
+
+static String |
+parseName(String XMPPAddress)
+
++ Returns the name portion of a XMPP address. |
+
+static String |
+parseResource(String XMPPAddress)
+
++ Returns the resource portion of a XMPP address. |
+
+static String |
+parseServer(String XMPPAddress)
+
++ Returns the server portion of a XMPP address. |
+
+static String |
+randomString(int length)
+
++ Returns a random String of numbers and letters (lower and upper case) + of the specified length. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public static String parseName(String XMPPAddress)+
+
XMPPAddress
- the XMPP address.
++public static String parseServer(String XMPPAddress)+
+
XMPPAddress
- the XMPP address.
++public static String parseResource(String XMPPAddress)+
+
XMPPAddress
- the XMPP address.
++public static String parseBareAddress(String XMPPAddress)+
+
XMPPAddress
- the XMPP address.
++public static String escapeForXML(String string)+
+
string
- the string to escape.
++public static String hash(String data)+
+ A hash is a one-way function -- that is, given an + input, an output is easily computed. However, given the output, the + input is almost impossible to compute. This is useful for passwords + since we can store the hash and a hacker will then have a very hard time + determining the original password. +
+
data
- the String to compute the hash of.
++public static String encodeHex(byte[] bytes)+
+
bytes
- an array of bytes to convert to a hex string.
++public static String encodeBase64(String data)+
+
data
- a String to encode.
++public static String encodeBase64(byte[] data)+
+
data
- a byte array to encode.
++public static byte[] decodeBase64(String data)+
+
data
- a base64 encoded String to decode.
++public static final String randomString(int length)+
+ + The specified length must be at least one. If not, the method will return + null. +
+
length
- the desired length of the random String to return.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface WriterListener
+Interface that allows for implementing classes to listen for string writing + events. Listeners are registered with ObservableWriter objects. +
+ +
+
ObservableWriter.addWriterListener(org.jivesoftware.smack.util.WriterListener)
,
+ObservableWriter.removeWriterListener(org.jivesoftware.smack.util.WriterListener)
+Method Summary | +|
---|---|
+ void |
+write(String str)
+
++ Notification that the Writer has written a new string. |
+
+Method Detail | +
---|
+void write(String str)+
+
str
- the written string
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +ReaderListener + +WriterListener |
+
+Classes
+
+ +Cache + +DNSUtil + +DNSUtil.HostAddress + +ObservableReader + +ObservableWriter + +PacketParserUtils + +StringUtils |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
ReaderListener | +Interface that allows for implementing classes to listen for string reading + events. | +
WriterListener | +Interface that allows for implementing classes to listen for string writing + events. | +
+ +
+Class Summary | +|
---|---|
Cache | +A specialized Map that is size-limited (using an LRU algorithm) and + has an optional expiration time for cache items. | +
DNSUtil | +Utilty class to perform DNS lookups for XMPP services. | +
DNSUtil.HostAddress | +Encapsulates a hostname and port. | +
ObservableReader | +An ObservableReader is a wrapper on a Reader that notifies to its listeners when + reading character streams. | +
ObservableWriter | +An ObservableWriter is a wrapper on a Writer that notifies to its listeners when + writing to character streams. | +
PacketParserUtils | +Utility class that helps to parse packets. | +
StringUtils | +A collection of utility methods for String objects. | +
+Utility classes. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.DefaultMessageEventRequestListener +
public class DefaultMessageEventRequestListener
+Default implementation of the MessageEventRequestListener interface.
+ + This class automatically sends a delivered notification to the sender of the message + if the sender has requested to be notified when the message is delivered. +
+ +
+
+Constructor Summary | +|
---|---|
DefaultMessageEventRequestListener()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+composingNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request that the receiver of the message is composing a reply notification is + received. |
+
+ void |
+deliveredNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request for message delivered notification is received. |
+
+ void |
+displayedNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request for message displayed notification is received. |
+
+ void |
+offlineNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request that the receiver of the message is offline is received. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DefaultMessageEventRequestListener()+
+Method Detail | +
---|
+public void deliveredNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
MessageEventRequestListener
+
deliveredNotificationRequested
in interface MessageEventRequestListener
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.+public void displayedNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
MessageEventRequestListener
+
displayedNotificationRequested
in interface MessageEventRequestListener
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.+public void composingNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
MessageEventRequestListener
+
composingNotificationRequested
in interface MessageEventRequestListener
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.+public void offlineNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
MessageEventRequestListener
+
offlineNotificationRequested
in interface MessageEventRequestListener
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.Form +
public class Form
+Represents a Form for gathering data. The form could be of the following types: +
+ +
+
+Field Summary | +|
---|---|
+static String |
+TYPE_CANCEL
+
++ |
+
+static String |
+TYPE_FORM
+
++ |
+
+static String |
+TYPE_RESULT
+
++ |
+
+static String |
+TYPE_SUBMIT
+
++ |
+
+Constructor Summary | +|
---|---|
Form(String type)
+
++ Creates a new Form of a given type from scratch. |
+
+Method Summary | +|
---|---|
+ void |
+addField(FormField field)
+
++ Adds a new field to complete as part of the form. |
+
+ Form |
+createAnswerForm()
+
++ Returns a new Form to submit the completed values. |
+
+ DataForm |
+getDataFormToSend()
+
++ Returns a DataForm that serves to send this Form to the server. |
+
+ FormField |
+getField(String variable)
+
++ Returns the field of the form whose variable matches the specified variable. |
+
+ Iterator |
+getFields()
+
++ Returns an Iterator for the fields that are part of the form. |
+
+static Form |
+getFormFrom(Packet packet)
+
++ Returns a new ReportedData if the packet is used for gathering data and includes an + extension that matches the elementName and namespace "x","jabber:x:data". |
+
+ String |
+getInstructions()
+
++ Returns the instructions that explain how to fill out the form and what the form is about. |
+
+ String |
+getTitle()
+
++ Returns the description of the data. |
+
+ String |
+getType()
+
++ Returns the meaning of the data within the context. |
+
+ void |
+setAnswer(String variable,
+ boolean value)
+
++ Sets a new boolean value to a given form's field. |
+
+ void |
+setAnswer(String variable,
+ double value)
+
++ Sets a new double value to a given form's field. |
+
+ void |
+setAnswer(String variable,
+ float value)
+
++ Sets a new float value to a given form's field. |
+
+ void |
+setAnswer(String variable,
+ int value)
+
++ Sets a new int value to a given form's field. |
+
+ void |
+setAnswer(String variable,
+ List values)
+
++ Sets a new values to a given form's field. |
+
+ void |
+setAnswer(String variable,
+ long value)
+
++ Sets a new long value to a given form's field. |
+
+ void |
+setAnswer(String variable,
+ String value)
+
++ Sets a new String value to a given form's field. |
+
+ void |
+setDefaultAnswer(String variable)
+
++ Sets the default value as the value of a given form's field. |
+
+ void |
+setInstructions(String instructions)
+
++ Sets instructions that explain how to fill out the form and what the form is about. |
+
+ void |
+setTitle(String title)
+
++ Sets the description of the data. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String TYPE_FORM+
+public static final String TYPE_SUBMIT+
+public static final String TYPE_CANCEL+
+public static final String TYPE_RESULT+
+Constructor Detail | +
---|
+public Form(String type)+
+ + Possible form types are: +
+
type
- the form's type (e.g. form, submit,cancel,result).+Method Detail | +
---|
+public static Form getFormFrom(Packet packet)+
+
packet
- the packet used for gathering data.+public void addField(FormField field)+
+
field
- the field to complete.+public void setAnswer(String variable, + String value)+
+ + If the value to set to the field is not a basic type (e.g. String, boolean, int, etc.) you + can use this message where the String value is the String representation of the object. +
+
variable
- the variable name that was completed.value
- the String value that was answered.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.
+IllegalArgumentException
- if the answer type does not correspond with the field type.+public void setAnswer(String variable, + int value)+
+
variable
- the variable name that was completed.value
- the int value that was answered.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.
+IllegalArgumentException
- if the answer type does not correspond with the field type.+public void setAnswer(String variable, + long value)+
+
variable
- the variable name that was completed.value
- the long value that was answered.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.
+IllegalArgumentException
- if the answer type does not correspond with the field type.+public void setAnswer(String variable, + float value)+
+
variable
- the variable name that was completed.value
- the float value that was answered.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.
+IllegalArgumentException
- if the answer type does not correspond with the field type.+public void setAnswer(String variable, + double value)+
+
variable
- the variable name that was completed.value
- the double value that was answered.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.
+IllegalArgumentException
- if the answer type does not correspond with the field type.+public void setAnswer(String variable, + boolean value)+
+
variable
- the variable name that was completed.value
- the boolean value that was answered.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.
+IllegalArgumentException
- if the answer type does not correspond with the field type.+public void setAnswer(String variable, + List values)+
+ + The Objects contained in the List could be of any type. The String representation of them + (i.e. #toString) will be actually used when sending the answer to the server. +
+
variable
- the variable that was completed.values
- the values that were answered.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.+public void setDefaultAnswer(String variable)+
+
variable
- the variable to complete with its default value.
+IllegalStateException
- if the form is not of type "submit".
+IllegalArgumentException
- if the form does not include the specified variable.+public Iterator getFields()+
+
+public FormField getField(String variable)+
+
variable
- the variable to look for in the form fields.
++public String getInstructions()+
+
+public String getTitle()+
+
+public String getType()+
+ + Possible form types are: +
+
+public void setInstructions(String instructions)+
+
instructions
- instructions that explain how to fill out the form.+public void setTitle(String title)+
+
title
- description of the data.+public DataForm getDataFormToSend()+
+
+public Form createAnswerForm()+
+ + The reason why the fields with variables are included in the new form is to provide a model + for binding with any UI. This means that the UIs will use the original form (of type + "form") to learn how to render the form, but the UIs will bind the fields to the form of + type submit. +
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.FormField.Option +
public static class FormField.Option
+Represents the available option of a given FormField. +
+ +
+
+Constructor Summary | +|
---|---|
FormField.Option(String value)
+
++ |
+|
FormField.Option(String label,
+ String value)
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getLabel()
+
++ Returns the label that represents the option. |
+
+ String |
+getValue()
+
++ Returns the value of the option. |
+
+ String |
+toString()
+
++ |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public FormField.Option(String value)+
+public FormField.Option(String label, + String value)+
+Method Detail | +
---|
+public String getLabel()+
+
+public String getValue()+
+
+public String toString()+
toString
in class Object
+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.FormField +
public class FormField
+Represents a field of a form. The field could be used to represent a question to complete, + a completed question or a data returned from a search. The exact interpretation of the field + depends on the context where the field is used. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+FormField.Option
+
++ Represents the available option of a given FormField. |
+
+Field Summary | +|
---|---|
+static String |
+TYPE_BOOLEAN
+
++ |
+
+static String |
+TYPE_FIXED
+
++ |
+
+static String |
+TYPE_HIDDEN
+
++ |
+
+static String |
+TYPE_JID_MULTI
+
++ |
+
+static String |
+TYPE_JID_SINGLE
+
++ |
+
+static String |
+TYPE_LIST_MULTI
+
++ |
+
+static String |
+TYPE_LIST_SINGLE
+
++ |
+
+static String |
+TYPE_TEXT_MULTI
+
++ |
+
+static String |
+TYPE_TEXT_PRIVATE
+
++ |
+
+static String |
+TYPE_TEXT_SINGLE
+
++ |
+
+Constructor Summary | +|
---|---|
FormField()
+
++ Creates a new FormField of type FIXED. |
+|
FormField(String variable)
+
++ Creates a new FormField with the variable name that uniquely identifies the field + in the context of the form. |
+
+Method Summary | +|
---|---|
+ void |
+addOption(FormField.Option option)
+
++ Adss an available options to the question that the user has in order to answer + the question. |
+
+ void |
+addValue(String value)
+
++ Adds a default value to the question if the question is part of a form to fill out. |
+
+ void |
+addValues(List newValues)
+
++ Adds a default values to the question if the question is part of a form to fill out. |
+
+ String |
+getDescription()
+
++ Returns a description that provides extra clarification about the question. |
+
+ String |
+getLabel()
+
++ Returns the label of the question which should give enough information to the user to + fill out the form. |
+
+ Iterator |
+getOptions()
+
++ Returns an Iterator for the available options that the user has in order to answer + the question. |
+
+ String |
+getType()
+
++ Returns an indicative of the format for the data to answer. |
+
+ Iterator |
+getValues()
+
++ Returns an Iterator for the default values of the question if the question is part + of a form to fill out. |
+
+ String |
+getVariable()
+
++ Returns the variable name that the question is filling out. |
+
+ boolean |
+isRequired()
+
++ Returns true if the question must be answered in order to complete the questionnaire. |
+
+protected void |
+resetValues()
+
++ Removes all the values of the field. |
+
+ void |
+setDescription(String description)
+
++ Sets a description that provides extra clarification about the question. |
+
+ void |
+setLabel(String label)
+
++ Sets the label of the question which should give enough information to the user to + fill out the form. |
+
+ void |
+setRequired(boolean required)
+
++ Sets if the question must be answered in order to complete the questionnaire. |
+
+ void |
+setType(String type)
+
++ Sets an indicative of the format for the data to answer. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String TYPE_BOOLEAN+
+public static final String TYPE_FIXED+
+public static final String TYPE_HIDDEN+
+public static final String TYPE_JID_MULTI+
+public static final String TYPE_JID_SINGLE+
+public static final String TYPE_LIST_MULTI+
+public static final String TYPE_LIST_SINGLE+
+public static final String TYPE_TEXT_MULTI+
+public static final String TYPE_TEXT_PRIVATE+
+public static final String TYPE_TEXT_SINGLE+
+Constructor Detail | +
---|
+public FormField(String variable)+
+
variable
- the variable name of the question.+public FormField()+
+
+Method Detail | +
---|
+public String getDescription()+
+ + If the question is of type FIXED then the description should remain empty. +
+
+public String getLabel()+
+
+public Iterator getOptions()+
+
+public boolean isRequired()+
+
+public String getType()+
+
+public Iterator getValues()+
+
+public String getVariable()+
+
+public void setDescription(String description)+
+ + If the question is of type FIXED then the description should remain empty. +
+
description
- provides extra clarification about the question.+public void setLabel(String label)+
+
label
- the label of the question.+public void setRequired(boolean required)+
+
required
- if the question must be answered in order to complete the questionnaire.+public void setType(String type)+
+
type
- an indicative of the format for the data to answer.+public void addValue(String value)+
+
value
- a default value or an answered value of the question.+public void addValues(List newValues)+
+
newValues
- default values or an answered values of the question.+protected void resetValues()+
+
+public void addOption(FormField.Option option)+
+
option
- a new available option for the question.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.GroupChatInvitation.Provider +
public static class GroupChatInvitation.Provider
+
+Constructor Summary | +|
---|---|
GroupChatInvitation.Provider()
+
++ |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse an extension sub-packet and create a PacketExtension instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public GroupChatInvitation.Provider()+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
PacketExtensionProvider
+
parseExtension
in interface PacketExtensionProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.GroupChatInvitation +
public class GroupChatInvitation
+A group chat invitation packet extension, which is used to invite other + users to a group chat room. To invite a user to a group chat room, address + a new message to the user and set the room name appropriately, as in the + following code example: + +
+ Message message = new Message("user@chat.example.com"); + message.setBody("Join me for a group chat!"); + message.addExtension(new GroupChatInvitation("room@chat.example.com");); + con.sendPacket(message); ++ + To listen for group chat invitations, use a PacketExtensionFilter for the + x element name and jabber:x:conference namespace, as in the + following code example: + +
+ PacketFilter filter = new PacketExtensionFilter("x", "jabber:x:conference"); + // Create a packet collector or packet listeners using the filter... ++ + Note: this protocol is outdated now that the Multi-User Chat (MUC) JEP is available + (JEP-45). However, most + existing clients still use this older protocol. Once MUC support becomes more + widespread, this API may be deprecated. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+GroupChatInvitation.Provider
+
++ |
+
+Field Summary | +|
---|---|
+static String |
+ELEMENT_NAME
+
++ Element name of the packet extension. |
+
+static String |
+NAMESPACE
+
++ Namespace of the packet extension. |
+
+Constructor Summary | +|
---|---|
GroupChatInvitation(String roomAddress)
+
++ Creates a new group chat invitation to the specified room address. |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+getRoomAddress()
+
++ Returns the address of the group chat room. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String ELEMENT_NAME+
+
+public static final String NAMESPACE+
+
+Constructor Detail | +
---|
+public GroupChatInvitation(String roomAddress)+
+
roomAddress
- the address of the group chat room.+Method Detail | +
---|
+public String getRoomAddress()+
+
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.MessageEventManager +
public class MessageEventManager
+Manages message events requests and notifications. A MessageEventManager provides a high + level access to request for notifications and send event notifications. It also provides + an easy way to hook up custom logic when requests or notifications are received. +
+ +
+
+Constructor Summary | +|
---|---|
MessageEventManager(XMPPConnection con)
+
++ Creates a new message event manager. |
+
+Method Summary | +|
---|---|
+ void |
+addMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
+
++ Adds a message event notification listener. |
+
+ void |
+addMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
+
++ Adds a message event request listener. |
+
+static void |
+addNotificationsRequests(Message message,
+ boolean offline,
+ boolean delivered,
+ boolean displayed,
+ boolean composing)
+
++ Adds event notification requests to a message. |
+
+ void |
+destroy()
+
++ |
+
+ void |
+finalize()
+
++ |
+
+ void |
+removeMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
+
++ Removes a message event notification listener. |
+
+ void |
+removeMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
+
++ Removes a message event request listener. |
+
+ void |
+sendCancelledNotification(String to,
+ String packetID)
+
++ Sends the notification that the receiver of the message has cancelled composing a reply. |
+
+ void |
+sendComposingNotification(String to,
+ String packetID)
+
++ Sends the notification that the receiver of the message is composing a reply |
+
+ void |
+sendDeliveredNotification(String to,
+ String packetID)
+
++ Sends the notification that the message was delivered to the sender of the original message |
+
+ void |
+sendDisplayedNotification(String to,
+ String packetID)
+
++ Sends the notification that the message was displayed to the sender of the original message |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MessageEventManager(XMPPConnection con)+
+
con
- an XMPPConnection.+Method Detail | +
---|
+public static void addNotificationsRequests(Message message, + boolean offline, + boolean delivered, + boolean displayed, + boolean composing)+
+
message
- the message to add the requested notifications.offline
- specifies if the offline event is requested.delivered
- specifies if the delivered event is requested.displayed
- specifies if the displayed event is requested.composing
- specifies if the composing event is requested.+public void addMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)+
+
messageEventRequestListener
- a message event request listener.+public void removeMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)+
+
messageEventRequestListener
- a message event request listener.+public void addMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)+
+
messageEventNotificationListener
- a message event notification listener.+public void removeMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)+
+
messageEventNotificationListener
- a message event notification listener.+public void sendDeliveredNotification(String to, + String packetID)+
+
to
- the recipient of the notification.packetID
- the id of the message to send.+public void sendDisplayedNotification(String to, + String packetID)+
+
to
- the recipient of the notification.packetID
- the id of the message to send.+public void sendComposingNotification(String to, + String packetID)+
+
to
- the recipient of the notification.packetID
- the id of the message to send.+public void sendCancelledNotification(String to, + String packetID)+
+
to
- the recipient of the notification.packetID
- the id of the message to send.+public void destroy()+
+public void finalize()+
finalize
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface MessageEventNotificationListener
+A listener that is fired anytime a message event notification is received. + Message event notifications are received as a consequence of the request + to receive notifications when sending a message. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+cancelledNotification(String from,
+ String packetID)
+
++ Called when a notification that the receiver of the message cancelled the reply + is received. |
+
+ void |
+composingNotification(String from,
+ String packetID)
+
++ Called when a notification that the receiver of the message is composing a reply is + received. |
+
+ void |
+deliveredNotification(String from,
+ String packetID)
+
++ Called when a notification of message delivered is received. |
+
+ void |
+displayedNotification(String from,
+ String packetID)
+
++ Called when a notification of message displayed is received. |
+
+ void |
+offlineNotification(String from,
+ String packetID)
+
++ Called when a notification that the receiver of the message is offline is received. |
+
+Method Detail | +
---|
+void deliveredNotification(String from, + String packetID)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.+void displayedNotification(String from, + String packetID)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.+void composingNotification(String from, + String packetID)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.+void offlineNotification(String from, + String packetID)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.+void cancelledNotification(String from, + String packetID)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface MessageEventRequestListener
+A listener that is fired anytime a message event request is received. + Message event requests are received when the received message includes an extension + like this: + +
+ <x xmlns='jabber:x:event'> + <offline/> + <delivered/> + <composing/> + </x> ++ + In this example you can see that the sender of the message requests to be notified + when the user couldn't receive the message because he/she is offline, the message + was delivered or when the receiver of the message is composing a reply. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+composingNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request that the receiver of the message is composing a reply notification is + received. |
+
+ void |
+deliveredNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request for message delivered notification is received. |
+
+ void |
+displayedNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request for message displayed notification is received. |
+
+ void |
+offlineNotificationRequested(String from,
+ String packetID,
+ MessageEventManager messageEventManager)
+
++ Called when a request that the receiver of the message is offline is received. |
+
+Method Detail | +
---|
+void deliveredNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.+void displayedNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.+void composingNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.+void offlineNotificationRequested(String from, + String packetID, + MessageEventManager messageEventManager)+
+
from
- the user that sent the notification.packetID
- the id of the message that was sent.messageEventManager
- the messageEventManager that fired the listener.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.MultipleRecipientInfo +
public class MultipleRecipientInfo
+MultipleRecipientInfo keeps information about the multiple recipients extension included + in a received packet. Among the information we can find the list of TO and CC addresses. +
+ +
+
+Method Summary | +|
---|---|
+ List |
+getCCAddresses()
+
++ Returns the list of MultipleAddresses.Address
+ that were the secondary recipients of the packet. |
+
+ MultipleAddresses.Address |
+getReplyAddress()
+
++ Returns the address to which all replies are requested to be sent or null if + no specific address was provided. |
+
+ String |
+getReplyRoom()
+
++ Returns the JID of a MUC room to which responses should be sent or null if + no specific address was provided. |
+
+ List |
+getTOAddresses()
+
++ Returns the list of MultipleAddresses.Address
+ that were the primary recipients of the packet. |
+
+ boolean |
+shouldNotReply()
+
++ Returns true if the received packet should not be replied. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public List getTOAddresses()+
MultipleAddresses.Address
+ that were the primary recipients of the packet.
++
+public List getCCAddresses()+
MultipleAddresses.Address
+ that were the secondary recipients of the packet.
++
+public String getReplyRoom()+
+
+public boolean shouldNotReply()+
MultipleRecipientManager.reply(org.jivesoftware.smack.XMPPConnection, org.jivesoftware.smack.packet.Message, org.jivesoftware.smack.packet.Message)
+ to send replies.
++
+public MultipleAddresses.Address getReplyAddress()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.MultipleRecipientManager +
public class MultipleRecipientManager
+A MultipleRecipientManager allows to send packets to multiple recipients by making use of + JEP-33: Extended Stanza Addressing. + It also allows to send replies to packets that were sent to multiple recipients. +
+ +
+
+Constructor Summary | +|
---|---|
MultipleRecipientManager()
+
++ |
+
+Method Summary | +|
---|---|
+static MultipleRecipientInfo |
+getMultipleRecipientInfo(Packet packet)
+
++ Returns the MultipleRecipientInfo contained in the specified packet or
+ null if none was found. |
+
+static void |
+reply(XMPPConnection connection,
+ Message original,
+ Message reply)
+
++ Sends a reply to a previously received packet that was sent to multiple recipients. |
+
+static void |
+send(XMPPConnection connection,
+ Packet packet,
+ List to,
+ List cc,
+ List bcc)
+
++ Sends the specified packet to the list of specified recipients using the + specified connection. |
+
+static void |
+send(XMPPConnection connection,
+ Packet packet,
+ List to,
+ List cc,
+ List bcc,
+ String replyTo,
+ String replyRoom,
+ boolean noReply)
+
++ Sends the specified packet to the list of specified recipients using the + specified connection. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MultipleRecipientManager()+
+Method Detail | +
---|
+public static void send(XMPPConnection connection, + Packet packet, + List to, + List cc, + List bcc) + throws XMPPException+
+
connection
- the connection to use to send the packet.packet
- the packet to send to the list of recipients.to
- the list of JIDs to include in the TO list or null if no TO
+ list exists.cc
- the list of JIDs to include in the CC list or null if no CC
+ list exists.bcc
- the list of JIDs to include in the BCC list or null if no BCC
+ list exists.
+XMPPException
- if server does not support JEP-33: Extended Stanza Addressing and
+ some JEP-33 specific features were requested.+public static void send(XMPPConnection connection, + Packet packet, + List to, + List cc, + List bcc, + String replyTo, + String replyRoom, + boolean noReply) + throws XMPPException+
+
connection
- the connection to use to send the packet.packet
- the packet to send to the list of recipients.to
- the list of JIDs to include in the TO list or null if no TO
+ list exists.cc
- the list of JIDs to include in the CC list or null if no CC
+ list exists.bcc
- the list of JIDs to include in the BCC list or null if no BCC
+ list exists.replyTo
- address to which all replies are requested to be sent or null
+ indicating that they can reply to any address.replyRoom
- JID of a MUC room to which responses should be sent or null
+ indicating that they can reply to any address.noReply
- true means that receivers should not reply to the message.
+XMPPException
- if server does not support JEP-33: Extended Stanza Addressing and
+ some JEP-33 specific features were requested.+public static void reply(XMPPConnection connection, + Message original, + Message reply) + throws XMPPException+
+
connection
- the connection to use to send the reply.original
- the previously received packet that was sent to multiple recipients.reply
- the new message to send as a reply.
+XMPPException
- if the original message was not sent to multiple recipients, or the
+ original message cannot be replied or reply should be sent to a room.+public static MultipleRecipientInfo getMultipleRecipientInfo(Packet packet)+
MultipleRecipientInfo
contained in the specified packet or
+ null if none was found. Only packets sent to multiple recipients will
+ contain such information.
++
packet
- the packet to check.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface NodeInformationProvider
+The NodeInformationProvider is responsible for providing information (i.e. DiscoverItems.Item) + about a given node. This information will be requested each time this XMPPP client receives a + disco items requests on the given node. +
+ +
+
+Method Summary | +|
---|---|
+ Iterator |
+getNodeItems()
+
++ Returns an Iterator on the Items DiscoverItems.Item
+ defined in the node. |
+
+Method Detail | +
---|
+Iterator getNodeItems()+
DiscoverItems.Item
+ defined in the node. For example, the MUC protocol specifies that an XMPP client should
+ answer an Item for each joined room when asked for the rooms where the use has joined.
++
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.OfflineMessageHeader +
public class OfflineMessageHeader
+The OfflineMessageHeader holds header information of an offline message. The header
+ information was retrieved using the OfflineMessageManager
class.
+
+ Each offline message is identified by the target user of the offline message and a unique stamp.
+ Use OfflineMessageManager.getMessages(java.util.List)
to retrieve the whole message.
+
+ +
+
+Constructor Summary | +|
---|---|
OfflineMessageHeader(DiscoverItems.Item item)
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getJid()
+
++ Returns the full JID of the user that sent the message. |
+
+ String |
+getStamp()
+
++ Returns the stamp that uniquely identifies the offline message. |
+
+ String |
+getUser()
+
++ Returns the bare JID of the user that was offline when the message was sent. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OfflineMessageHeader(DiscoverItems.Item item)+
+Method Detail | +
---|
+public String getUser()+
+
+public String getJid()+
+
+public String getStamp()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.OfflineMessageManager +
public class OfflineMessageManager
+The OfflineMessageManager helps manage offline messages even before the user has sent an + available presence. When a user asks for his offline messages before sending an available + presence then the server will not send a flood with all the offline messages when the user + becomes online. The server will not send a flood with all the offline messages to the session + that made the offline messages request or to any other session used by the user that becomes + online.
+ + Once the session that made the offline messages request has been closed and the user becomes + offline in all the resources then the server will resume storing the messages offline and will + send all the offline messages to the user when he becomes online. Therefore, the server will + flood the user when he becomes online unless the user uses this class to manage his offline + messages. +
+ +
+
+Constructor Summary | +|
---|---|
OfflineMessageManager(XMPPConnection connection)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+deleteMessages()
+
++ Deletes all offline messages of the user. |
+
+ void |
+deleteMessages(List nodes)
+
++ Deletes the specified list of offline messages. |
+
+ Iterator |
+getHeaders()
+
++ Returns an iterator on OfflineMessageHeader that keep information about the + offline message. |
+
+ int |
+getMessageCount()
+
++ Returns the number of offline messages for the user of the connection. |
+
+ Iterator |
+getMessages()
+
++ Returns an Iterator with all the offline Messages of the user. |
+
+ Iterator |
+getMessages(List nodes)
+
++ Returns an Iterator with the offline Messages whose stamp matches the specified + request. |
+
+ boolean |
+supportsFlexibleRetrieval()
+
++ Returns true if the server supports Flexible Offline Message Retrieval. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OfflineMessageManager(XMPPConnection connection)+
+Method Detail | +
---|
+public boolean supportsFlexibleRetrieval() + throws XMPPException+
+
XMPPException
- If the user is not allowed to make this request.+public int getMessageCount() + throws XMPPException+
+
XMPPException
- If the user is not allowed to make this request or the server does
+ not support offline message retrieval.+public Iterator getHeaders() + throws XMPPException+
+
XMPPException
- If the user is not allowed to make this request or the server does
+ not support offline message retrieval.+public Iterator getMessages(List nodes) + throws XMPPException+
deleteMessages(java.util.List)
to delete the messages.
++
nodes
- the list of stamps that uniquely identifies offline message.
+XMPPException
- If the user is not allowed to make this request or the server does
+ not support offline message retrieval.+public Iterator getMessages() + throws XMPPException+
deleteMessages(java.util.List)
+ to delete the messages.
++
XMPPException
- If the user is not allowed to make this request or the server does
+ not support offline message retrieval.+public void deleteMessages(List nodes) + throws XMPPException+
+
nodes
- the list of stamps that uniquely identifies offline message.
+XMPPException
- If the user is not allowed to make this request or the server does
+ not support offline message retrieval.+public void deleteMessages() + throws XMPPException+
+
XMPPException
- If the user is not allowed to make this request or the server does
+ not support offline message retrieval.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.PrivateDataManager.PrivateDataIQProvider +
public static class PrivateDataManager.PrivateDataIQProvider
+An IQ provider to parse IQ results containing private data. +
+ +
+
+Constructor Summary | +|
---|---|
PrivateDataManager.PrivateDataIQProvider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public PrivateDataManager.PrivateDataIQProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.PrivateDataManager +
public class PrivateDataManager
+Manages private data, which is a mechanism to allow users to store arbitrary XML + data on an XMPP server. Each private data chunk is defined by a element name and + XML namespace. Example private data: + +
+ <color xmlns="http://example.com/xmpp/color"> + <favorite>blue</blue> + <leastFavorite>puce</leastFavorite> + </color> ++ +
PrivateDataProvider
instances are responsible for translating the XML into objects.
+ If no PrivateDataProvider is registered for a given element name and namespace, then
+ a DefaultPrivateData
instance will be returned.+ + Warning: this is an non-standard protocol documented by + JEP-49. Because this is a + non-standard protocol, it is subject to change. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+PrivateDataManager.PrivateDataIQProvider
+
++ An IQ provider to parse IQ results containing private data. |
+
+Constructor Summary | +|
---|---|
PrivateDataManager(XMPPConnection connection)
+
++ Creates a new private data manager. |
+|
PrivateDataManager(XMPPConnection connection,
+ String user)
+
++ Creates a new private data manager for a specific user (special case). |
+
+Method Summary | +|
---|---|
+static void |
+addPrivateDataProvider(String elementName,
+ String namespace,
+ PrivateDataProvider provider)
+
++ Adds a private data provider with the specified element name and name space. |
+
+ PrivateData |
+getPrivateData(String elementName,
+ String namespace)
+
++ Returns the private data specified by the given element name and namespace. |
+
+static PrivateDataProvider |
+getPrivateDataProvider(String elementName,
+ String namespace)
+
++ Returns the private data provider registered to the specified XML element name and namespace. |
+
+ void |
+setPrivateData(PrivateData privateData)
+
++ Sets a private data value. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public PrivateDataManager(XMPPConnection connection)+
+
connection
- an XMPP connection which must have already undergone a
+ successful login.+public PrivateDataManager(XMPPConnection connection, + String user)+
+
connection
- an XMPP connection which must have already undergone a
+ successful login.user
- the XMPP address of the user to get and set private data for.+Method Detail | +
---|
+public static PrivateDataProvider getPrivateDataProvider(String elementName, + String namespace)+
+ <iq type='result' to='joe@example.com' from='mary@example.com' id='time_1'> + <query xmlns='jabber:iq:private'> + <prefs xmlns='http://www.xmppclient.com/prefs'> + <value1>ABC</value1> + <value2>XYZ</value2> + </prefs> + </query> + </iq>+ +
Note: this method is generally only called by the internal Smack classes. +
+
elementName
- the XML element name.namespace
- the XML namespace.
++public static void addPrivateDataProvider(String elementName, + String namespace, + PrivateDataProvider provider)+
+
elementName
- the XML element name.namespace
- the XML namespace.provider
- the private data provider.+public PrivateData getPrivateData(String elementName, + String namespace) + throws XMPPException+
+
+ If a PrivateDataProvider is registered for the specified element name/namespace pair then
+ that provider will determine the specific object type that is returned. If no provider
+ is registered, a DefaultPrivateData
instance will be returned.
+
+
elementName
- the element name.namespace
- the namespace.
+XMPPException
- if an error occurs getting the private data.+public void setPrivateData(PrivateData privateData) + throws XMPPException+
+
privateData
- the private data.
+XMPPException
- if setting the private data fails.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.RemoteRosterEntry +
public class RemoteRosterEntry
+Represents a roster item, which consists of a JID and , their name and + the groups the roster item belongs to. This roster item does not belong + to the local roster. Therefore, it does not persist in the server.
+ + The idea of a RemoteRosterEntry is to be used as part of a roster exchange. +
+ +
+
+Constructor Summary | +|
---|---|
RemoteRosterEntry(String user,
+ String name,
+ String[] groups)
+
++ Creates a new remote roster entry. |
+
+Method Summary | +|
---|---|
+ String[] |
+getGroupArrayNames()
+
++ Returns a String array for the group names that the roster entry + belongs to. |
+
+ Iterator |
+getGroupNames()
+
++ Returns an Iterator for the group names (as Strings) that the roster entry + belongs to. |
+
+ String |
+getName()
+
++ Returns the user's name. |
+
+ String |
+getUser()
+
++ Returns the user. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public RemoteRosterEntry(String user, + String name, + String[] groups)+
+
user
- the user.name
- the user's name.groups
- the list of group names the entry will belong to, or null if the
+ the roster entry won't belong to a group.+Method Detail | +
---|
+public String getUser()+
+
+public String getName()+
+
+public Iterator getGroupNames()+
+
+public String[] getGroupArrayNames()+
+
+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.ReportedData.Column +
public static class ReportedData.Column
+Represents the columns definition of the reported data. +
+ +
+
+Constructor Summary | +|
---|---|
ReportedData.Column(String label,
+ String variable,
+ String type)
+
++ Creates a new column with the specified definition. |
+
+Method Summary | +|
---|---|
+ String |
+getLabel()
+
++ Returns the column's label. |
+
+ String |
+getType()
+
++ Returns the column's data format. |
+
+ String |
+getVariable()
+
++ Returns the variable name that the column is showing. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ReportedData.Column(String label, + String variable, + String type)+
+
label
- the columns's label.variable
- the variable name of the column.type
- the format for the returned data.+Method Detail | +
---|
+public String getLabel()+
+
+public String getType()+
+
+public String getVariable()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.ReportedData.Field +
public static class ReportedData.Field
+
+Constructor Summary | +|
---|---|
ReportedData.Field(String variable,
+ List values)
+
++ |
+
+Method Summary | +|
---|---|
+ Iterator |
+getValues()
+
++ Returns an iterator on the values reported as part of the search. |
+
+ String |
+getVariable()
+
++ Returns the variable name that the field represents. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ReportedData.Field(String variable, + List values)+
+Method Detail | +
---|
+public String getVariable()+
+
+public Iterator getValues()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.ReportedData.Row +
public static class ReportedData.Row
+
+Constructor Summary | +|
---|---|
ReportedData.Row(List fields)
+
++ |
+
+Method Summary | +|
---|---|
+ Iterator |
+getValues(String variable)
+
++ Returns the values of the field whose variable matches the requested variable. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ReportedData.Row(List fields)+
+Method Detail | +
---|
+public Iterator getValues(String variable)+
+
variable
- the variable to match.
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.ReportedData +
public class ReportedData
+Represents a set of data results returned as part of a search. The report is structured + in columns and rows. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+ReportedData.Column
+
++ Represents the columns definition of the reported data. |
+
+static class |
+ReportedData.Field
+
++ |
+
+static class |
+ReportedData.Row
+
++ |
+
+Constructor Summary | +|
---|---|
ReportedData()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addColumn(ReportedData.Column column)
+
++ Adds a new Column |
+
+ void |
+addRow(ReportedData.Row row)
+
++ Adds a new Row . |
+
+ Iterator |
+getColumns()
+
++ Returns an Iterator for the columns returned from a search. |
+
+static ReportedData |
+getReportedDataFrom(Packet packet)
+
++ Returns a new ReportedData if the packet is used for reporting data and includes an + extension that matches the elementName and namespace "x","jabber:x:data". |
+
+ Iterator |
+getRows()
+
++ Returns an Iterator for the rows returned from a search. |
+
+ String |
+getTitle()
+
++ Returns the report's title. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ReportedData()+
+Method Detail | +
---|
+public static ReportedData getReportedDataFrom(Packet packet)+
+
packet
- the packet used for reporting data.+public void addRow(ReportedData.Row row)+
Row
.
++
row
- the new row to add.+public void addColumn(ReportedData.Column column)+
Column
++
column
- the column to add.+public Iterator getRows()+
+
+public Iterator getColumns()+
+
+public String getTitle()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface RosterExchangeListener
+A listener that is fired anytime a roster exchange is received. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+entriesReceived(String from,
+ Iterator remoteRosterEntries)
+
++ Called when roster entries are received as part of a roster exchange. |
+
+Method Detail | +
---|
+void entriesReceived(String from, + Iterator remoteRosterEntries)+
+
from
- the user that sent the entries.remoteRosterEntries
- the entries sent by the user. The entries are instances of
+ RemoteRosterEntry.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.RosterExchangeManager +
public class RosterExchangeManager
+Manages Roster exchanges. A RosterExchangeManager provides a high level access to send + rosters, roster groups and roster entries to XMPP clients. It also provides an easy way + to hook up custom logic when entries are received from another XMPP client through + RosterExchangeListeners. +
+ +
+
+Constructor Summary | +|
---|---|
RosterExchangeManager(XMPPConnection con)
+
++ Creates a new roster exchange manager. |
+
+Method Summary | +|
---|---|
+ void |
+addRosterListener(RosterExchangeListener rosterExchangeListener)
+
++ Adds a listener to roster exchanges. |
+
+ void |
+destroy()
+
++ |
+
+ void |
+finalize()
+
++ |
+
+ void |
+removeRosterListener(RosterExchangeListener rosterExchangeListener)
+
++ Removes a listener from roster exchanges. |
+
+ void |
+send(RosterEntry rosterEntry,
+ String targetUserID)
+
++ Sends a roster entry to userID. |
+
+ void |
+send(RosterGroup rosterGroup,
+ String targetUserID)
+
++ Sends a roster group to userID. |
+
+ void |
+send(Roster roster,
+ String targetUserID)
+
++ Sends a roster to userID. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public RosterExchangeManager(XMPPConnection con)+
+
con
- an XMPPConnection.+Method Detail | +
---|
+public void addRosterListener(RosterExchangeListener rosterExchangeListener)+
+
rosterExchangeListener
- a roster exchange listener.+public void removeRosterListener(RosterExchangeListener rosterExchangeListener)+
+
rosterExchangeListener
- a roster exchange listener..+public void send(Roster roster, + String targetUserID)+
+
roster
- the roster to sendtargetUserID
- the user that will receive the roster entries+public void send(RosterEntry rosterEntry, + String targetUserID)+
+
rosterEntry
- the roster entry to sendtargetUserID
- the user that will receive the roster entries+public void send(RosterGroup rosterGroup, + String targetUserID)+
+
rosterGroup
- the roster group to sendtargetUserID
- the user that will receive the roster entries+public void destroy()+
+public void finalize()+
finalize
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.ServiceDiscoveryManager +
public class ServiceDiscoveryManager
+Manages discovery of services in XMPP entities. This class provides: +
+ +
+
+Constructor Summary | +|
---|---|
ServiceDiscoveryManager(XMPPConnection connection)
+
++ Creates a new ServiceDiscoveryManager for a given XMPPConnection. |
+
+Method Summary | +|
---|---|
+ void |
+addFeature(String feature)
+
++ Registers that a new feature is supported by this XMPP entity. |
+
+ boolean |
+canPublishItems(String entityID)
+
++ Returns true if the server supports publishing of items. |
+
+ DiscoverInfo |
+discoverInfo(String entityID)
+
++ Returns the discovered information of a given XMPP entity addressed by its JID. |
+
+ DiscoverInfo |
+discoverInfo(String entityID,
+ String node)
+
++ Returns the discovered information of a given XMPP entity addressed by its JID and + note attribute. |
+
+ DiscoverItems |
+discoverItems(String entityID)
+
++ Returns the discovered items of a given XMPP entity addressed by its JID. |
+
+ DiscoverItems |
+discoverItems(String entityID,
+ String node)
+
++ Returns the discovered items of a given XMPP entity addressed by its JID and + note attribute. |
+
+ Iterator |
+getFeatures()
+
++ Returns the supported features by this XMPP entity. |
+
+static String |
+getIdentityName()
+
++ Returns the name of the client that will be returned when asked for the client identity + in a disco request. |
+
+static String |
+getIdentityType()
+
++ Returns the type of client that will be returned when asked for the client identity in a + disco request. |
+
+static ServiceDiscoveryManager |
+getInstanceFor(XMPPConnection connection)
+
++ Returns the ServiceDiscoveryManager instance associated with a given XMPPConnection. |
+
+ boolean |
+includesFeature(String feature)
+
++ Returns true if the specified feature is registered in the ServiceDiscoveryManager. |
+
+ void |
+publishItems(String entityID,
+ DiscoverItems discoverItems)
+
++ Publishes new items to a parent entity. |
+
+ void |
+publishItems(String entityID,
+ String node,
+ DiscoverItems discoverItems)
+
++ Publishes new items to a parent entity and node. |
+
+ void |
+removeFeature(String feature)
+
++ Removes the specified feature from the supported features by this XMPP entity. |
+
+ void |
+removeNodeInformationProvider(String node)
+
++ Removes the NodeInformationProvider responsible for providing information + (ie items) related to a given node. |
+
+static void |
+setIdentityName(String name)
+
++ Sets the name of the client that will be returned when asked for the client identity + in a disco request. |
+
+static void |
+setIdentityType(String type)
+
++ Sets the type of client that will be returned when asked for the client identity in a + disco request. |
+
+ void |
+setNodeInformationProvider(String node,
+ NodeInformationProvider listener)
+
++ Sets the NodeInformationProvider responsible for providing information + (ie items) related to a given node. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ServiceDiscoveryManager(XMPPConnection connection)+
+
connection
- the connection to which a ServiceDiscoveryManager is going to be created.+Method Detail | +
---|
+public static ServiceDiscoveryManager getInstanceFor(XMPPConnection connection)+
+
connection
- the connection used to look for the proper ServiceDiscoveryManager.
++public static String getIdentityName()+
+
+public static void setIdentityName(String name)+
+
name
- the name of the client that will be returned when asked for the client identity
+ in a disco request.+public static String getIdentityType()+
+
+public static void setIdentityType(String type)+
+
type
- the type of client that will be returned when asked for the client identity in a
+ disco request.+public void setNodeInformationProvider(String node, + NodeInformationProvider listener)+
+ + In MUC, a node could be 'http://jabber.org/protocol/muc#rooms' which means that the + NodeInformationProvider will provide information about the rooms where the user has joined. +
+
node
- the node whose items will be provided by the NodeInformationProvider.listener
- the NodeInformationProvider responsible for providing items related
+ to the node.+public void removeNodeInformationProvider(String node)+
+
node
- the node to remove the associated NodeInformationProvider.+public Iterator getFeatures()+
+
+public void addFeature(String feature)+
+ + Since no packet is actually sent to the server it is safe to perform this operation + before logging to the server. In fact, you may want to configure the supported features + before logging to the server so that the information is already available if it is required + upon login. +
+
feature
- the feature to register as supported.+public void removeFeature(String feature)+
+ + Since no packet is actually sent to the server it is safe to perform this operation + before logging to the server. +
+
feature
- the feature to remove from the supported features.+public boolean includesFeature(String feature)+
+
feature
- the feature to look for.
++public DiscoverInfo discoverInfo(String entityID) + throws XMPPException+
+
entityID
- the address of the XMPP entity.
+XMPPException
- if the operation failed for some reason.+public DiscoverInfo discoverInfo(String entityID, + String node) + throws XMPPException+
+
entityID
- the address of the XMPP entity.node
- the attribute that supplements the 'jid' attribute.
+XMPPException
- if the operation failed for some reason.+public DiscoverItems discoverItems(String entityID) + throws XMPPException+
+
entityID
- the address of the XMPP entity.
+XMPPException
- if the operation failed for some reason.+public DiscoverItems discoverItems(String entityID, + String node) + throws XMPPException+
+
entityID
- the address of the XMPP entity.node
- the attribute that supplements the 'jid' attribute.
+XMPPException
- if the operation failed for some reason.+public boolean canPublishItems(String entityID) + throws XMPPException+
+
entityID
- the address of the XMPP entity.
+XMPPException
- if the operation failed for some reason.+public void publishItems(String entityID, + DiscoverItems discoverItems) + throws XMPPException+
+
entityID
- the address of the XMPP entity.discoverItems
- the DiscoveryItems to publish.
+XMPPException
- if the operation failed for some reason.+public void publishItems(String entityID, + String node, + DiscoverItems discoverItems) + throws XMPPException+
+
entityID
- the address of the XMPP entity.node
- the attribute that supplements the 'jid' attribute.discoverItems
- the DiscoveryItems to publish.
+XMPPException
- if the operation failed for some reason.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.SharedGroupManager +
public class SharedGroupManager
+A SharedGroupManager provides services for discovering the shared groups where a user belongs.
+ + Important note: This functionality is not part of the XMPP spec and it will only work + with Wildfire. +
+ +
+
+Constructor Summary | +|
---|---|
SharedGroupManager()
+
++ |
+
+Method Summary | +|
---|---|
+static List |
+getSharedGroups(XMPPConnection connection)
+
++ Returns the collection that will contain the name of the shared groups where the user + logged in with the specified session belongs. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SharedGroupManager()+
+Method Detail | +
---|
+public static List getSharedGroups(XMPPConnection connection) + throws XMPPException+
+
connection
- connection to use to get the user's shared groups.
+XMPPException
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.XHTMLManager +
public class XHTMLManager
+Manages XHTML formatted texts within messages. A XHTMLManager provides a high level access to + get and set XHTML bodies to messages, enable and disable XHTML support and check if remote XMPP + clients support XHTML. +
+ +
+
+Constructor Summary | +|
---|---|
XHTMLManager()
+
++ |
+
+Method Summary | +|
---|---|
+static void |
+addBody(Message message,
+ String body)
+
++ Adds an XHTML body to the message. |
+
+static Iterator |
+getBodies(Message message)
+
++ Returns an Iterator for the XHTML bodies in the message. |
+
+static boolean |
+isServiceEnabled(XMPPConnection connection)
+
++ Returns true if the XHTML support is enabled for the given connection. |
+
+static boolean |
+isServiceEnabled(XMPPConnection connection,
+ String userID)
+
++ Returns true if the specified user handles XHTML messages. |
+
+static boolean |
+isXHTMLMessage(Message message)
+
++ Returns true if the message contains an XHTML extension. |
+
+static void |
+setServiceEnabled(XMPPConnection connection,
+ boolean enabled)
+
++ Enables or disables the XHTML support on a given connection. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public XHTMLManager()+
+Method Detail | +
---|
+public static Iterator getBodies(Message message)+
+
message
- an XHTML message
++public static void addBody(Message message, + String body)+
+
message
- the message that will receive the XHTML bodybody
- the string to add as an XHTML body to the message+public static boolean isXHTMLMessage(Message message)+
+
message
- the message to check if contains an XHTML extentsion or not
++public static void setServiceEnabled(XMPPConnection connection, + boolean enabled)+
+ + Before starting to send XHTML messages to a user, check that the user can handle XHTML + messages. Enable the XHTML support to indicate that this client handles XHTML messages. +
+
connection
- the connection where the service will be enabled or disabledenabled
- indicates if the service will be enabled or disabled+public static boolean isServiceEnabled(XMPPConnection connection)+
+
connection
- the connection to look for XHTML support
++public static boolean isServiceEnabled(XMPPConnection connection, + String userID)+
+
connection
- the connection to use to perform the service discoveryuserID
- the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.XHTMLText +
public class XHTMLText
+An XHTMLText represents formatted text. This class also helps to build valid + XHTML tags. +
+ +
+
+Constructor Summary | +|
---|---|
XHTMLText(String style,
+ String lang)
+
++ Creates a new XHTMLText with body tag params. |
+
+Method Summary | +|
---|---|
+ void |
+append(String textToAppend)
+
++ Appends a given text to the XHTMLText. |
+
+ void |
+appendBrTag()
+
++ Appends a tag that inserts a single carriage return. |
+
+ void |
+appendCloseAnchorTag()
+
++ Appends a tag that indicates that an anchor section ends. |
+
+ void |
+appendCloseBlockQuoteTag()
+
++ Appends a tag that indicates that a blockquote section ends. |
+
+ void |
+appendCloseCodeTag()
+
++ Appends a tag that indicates end of text that is the code for a program. |
+
+ void |
+appendCloseEmTag()
+
++ Appends a tag that indicates end of emphasis. |
+
+ void |
+appendCloseHeaderTag(int level)
+
++ Appends a tag that indicates that a header section ends. |
+
+ void |
+appendCloseInlinedQuoteTag()
+
++ Appends a tag that indicates that an inlined quote section ends. |
+
+ void |
+appendCloseOrderedListTag()
+
++ Appends a tag that indicates that an ordered list section ends. |
+
+ void |
+appendCloseParagraphTag()
+
++ Appends a tag that indicates the end of a new paragraph. |
+
+ void |
+appendCloseSpanTag()
+
++ Appends a tag that indicates that a span section ends. |
+
+ void |
+appendCloseStrongTag()
+
++ Appends a tag that indicates that a strong section ends. |
+
+ void |
+appendCloseUnorderedListTag()
+
++ Appends a tag that indicates that an unordered list section ends. |
+
+ void |
+appendImageTag(String align,
+ String alt,
+ String height,
+ String src,
+ String width)
+
++ Appends a tag that indicates an image. |
+
+ void |
+appendLineItemTag(String style)
+
++ Appends a tag that indicates the start of a new line item within a list. |
+
+ void |
+appendOpenAnchorTag(String href,
+ String style)
+
++ Appends a tag that indicates that an anchor section begins. |
+
+ void |
+appendOpenBlockQuoteTag(String style)
+
++ Appends a tag that indicates that a blockquote section begins. |
+
+ void |
+appendOpenCiteTag()
+
++ Appends a tag that indicates a reference to work, such as a book, report or web site. |
+
+ void |
+appendOpenCodeTag()
+
++ Appends a tag that indicates text that is the code for a program. |
+
+ void |
+appendOpenEmTag()
+
++ Appends a tag that indicates emphasis. |
+
+ void |
+appendOpenHeaderTag(int level,
+ String style)
+
++ Appends a tag that indicates a header, a title of a section of the message. |
+
+ void |
+appendOpenInlinedQuoteTag(String style)
+
++ Appends a tag that indicates that an inlined quote section begins. |
+
+ void |
+appendOpenOrderedListTag(String style)
+
++ Appends a tag that creates an ordered list. |
+
+ void |
+appendOpenParagraphTag(String style)
+
++ Appends a tag that indicates the start of a new paragraph. |
+
+ void |
+appendOpenSpanTag(String style)
+
++ Appends a tag that allows to set the fonts for a span of text. |
+
+ void |
+appendOpenStrongTag()
+
++ Appends a tag that indicates text which should be more forceful than surrounding text. |
+
+ void |
+appendOpenUnorderedListTag(String style)
+
++ Appends a tag that creates an unordered list. |
+
+ String |
+toString()
+
++ Returns the text of the XHTMLText. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public XHTMLText(String style, + String lang)+
+
style
- the XHTML style of the bodylang
- the language of the body+Method Detail | +
---|
+public void appendOpenAnchorTag(String href, + String style)+
+
href
- indicates the URL being linked tostyle
- the XHTML style of the anchor+public void appendCloseAnchorTag()+
+
+public void appendOpenBlockQuoteTag(String style)+
+
style
- the XHTML style of the blockquote+public void appendCloseBlockQuoteTag()+
+
+public void appendBrTag()+
+
+public void appendOpenCiteTag()+
+
+public void appendOpenCodeTag()+
+
+public void appendCloseCodeTag()+
+
+public void appendOpenEmTag()+
+
+public void appendCloseEmTag()+
+
+public void appendOpenHeaderTag(int level, + String style)+
+
level
- the level of the Header. It should be a value between 1 and 3style
- the XHTML style of the blockquote+public void appendCloseHeaderTag(int level)+
+
level
- the level of the Header. It should be a value between 1 and 3+public void appendImageTag(String align, + String alt, + String height, + String src, + String width)+
+
align
- how text should flow around the picturealt
- the text to show if you don't show the pictureheight
- how tall is the picturesrc
- where to get the picturewidth
- how wide is the picture+public void appendLineItemTag(String style)+
+
style
- the style of the line item+public void appendOpenOrderedListTag(String style)+
+
style
- the style of the ordered list+public void appendCloseOrderedListTag()+
+
+public void appendOpenUnorderedListTag(String style)+
+
style
- the style of the unordered list+public void appendCloseUnorderedListTag()+
+
+public void appendOpenParagraphTag(String style)+
+
style
- the style of the paragraph+public void appendCloseParagraphTag()+
+
+public void appendOpenInlinedQuoteTag(String style)+
+
style
- the style of the inlined quote+public void appendCloseInlinedQuoteTag()+
+
+public void appendOpenSpanTag(String style)+
+
style
- the style for a span of text+public void appendCloseSpanTag()+
+
+public void appendOpenStrongTag()+
+
+public void appendCloseStrongTag()+
+
+public void append(String textToAppend)+
+
textToAppend
- the text to append+public String toString()+
+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.debugger.EnhancedDebugger +
public class EnhancedDebugger
+The EnhancedDebugger is a debugger that allows to debug sent, received and interpreted messages + but also provides the ability to send ad-hoc messages composed by the user.
+
+ A new EnhancedDebugger will be created for each connection to debug. All the EnhancedDebuggers + will be shown in the same debug window provided by the class EnhancedDebuggerWindow. ++ +
+
+Constructor Summary | +|
---|---|
EnhancedDebugger(XMPPConnection connection,
+ Writer writer,
+ Reader reader)
+
++ |
+
+Method Summary | +|
---|---|
+ Reader |
+getReader()
+
++ Returns the special Reader that wraps the main Reader and logs data to the GUI. |
+
+ PacketListener |
+getReaderListener()
+
++ Returns the thread that will listen for all incoming packets and write them to the GUI. |
+
+ Writer |
+getWriter()
+
++ Returns the special Writer that wraps the main Writer and logs data to the GUI. |
+
+ PacketListener |
+getWriterListener()
+
++ Returns the thread that will listen for all outgoing packets and write them to the GUI. |
+
+ Reader |
+newConnectionReader(Reader newReader)
+
++ Returns a new special Reader that wraps the new connection Reader. |
+
+ Writer |
+newConnectionWriter(Writer newWriter)
+
++ Returns a new special Writer that wraps the new connection Writer. |
+
+ void |
+userHasLogged(String user)
+
++ Called when a user has logged in to the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public EnhancedDebugger(XMPPConnection connection, + Writer writer, + Reader reader)+
+Method Detail | +
---|
+public Reader newConnectionReader(Reader newReader)+
SmackDebugger
+
newConnectionReader
in interface SmackDebugger
+public Writer newConnectionWriter(Writer newWriter)+
SmackDebugger
+
newConnectionWriter
in interface SmackDebugger
+public void userHasLogged(String user)+
SmackDebugger
+
userHasLogged
in interface SmackDebugger
user
- the user@host/resource that has just logged in+public Reader getReader()+
SmackDebugger
+
getReader
in interface SmackDebugger
+public Writer getWriter()+
SmackDebugger
+
getWriter
in interface SmackDebugger
+public PacketListener getReaderListener()+
SmackDebugger
+
getReaderListener
in interface SmackDebugger
+public PacketListener getWriterListener()+
SmackDebugger
+
getWriterListener
in interface SmackDebugger
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.debugger.EnhancedDebuggerWindow +
public class EnhancedDebuggerWindow
+The EnhancedDebuggerWindow is the main debug window that will show all the EnhancedDebuggers. + For each connection to debug there will be an EnhancedDebugger that will be shown in the + EnhancedDebuggerWindow.
+
+ This class also provides information about Smack like for example the Smack version and the + installed providers. ++ +
+
+Field Summary | +|
---|---|
+static int |
+MAX_TABLE_ROWS
+
++ Keeps the max number of rows to keep in the tables. |
+
+static boolean |
+PERSISTED_DEBUGGER
+
++ |
+
+Method Summary | +|
---|---|
+static EnhancedDebuggerWindow |
+getInstance()
+
++ Returns the unique EnhancedDebuggerWindow instance available in the system. |
+
+ boolean |
+isVisible()
+
++ |
+
+ void |
+rootWindowClosing(WindowEvent evt)
+
++ Notification that the root window is closing. |
+
+ void |
+setVisible(boolean visible)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static boolean PERSISTED_DEBUGGER+
+public static int MAX_TABLE_ROWS+
+
+Method Detail | +
---|
+public static EnhancedDebuggerWindow getInstance()+
+
+public void rootWindowClosing(WindowEvent evt)+
+
evt
- the event that indicates that the root window is closing+public void setVisible(boolean visible)+
+public boolean isVisible()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +EnhancedDebugger + +EnhancedDebuggerWindow |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Class Summary | +|
---|---|
EnhancedDebugger | +The EnhancedDebugger is a debugger that allows to debug sent, received and interpreted messages + but also provides the ability to send ad-hoc messages composed by the user. | +
EnhancedDebuggerWindow | +The EnhancedDebuggerWindow is the main debug window that will show all the EnhancedDebuggers. | +
+Smack optional Debuggers. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.StreamNegotiator +
org.jivesoftware.smackx.filetransfer.FaultTolerantNegotiator +
public class FaultTolerantNegotiator
+The fault tolerant negotiator takes two stream negotiators, the primary and the secondary negotiator. + If the primary negotiator fails during the stream negotiaton process, the second negotiator is used. +
+ +
+
+Constructor Summary | +|
---|---|
FaultTolerantNegotiator(XMPPConnection connection,
+ StreamNegotiator primary,
+ StreamNegotiator secondary)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+cleanup()
+
++ Cleanup any and all resources associated with this negotiator. |
+
+ InputStream |
+createIncomingStream(StreamInitiation initiation)
+
++ This method handles the file stream download negotiation process. |
+
+ OutputStream |
+createOutgoingStream(String streamID,
+ String initiator,
+ String target)
+
++ This method handles the file upload stream negotiation process. |
+
+ PacketFilter |
+getInitiationPacketFilter(String from,
+ String streamID)
+
++ Returns the packet filter that will return the initiation packet for the appropriate stream + initiation. |
+
+ String[] |
+getNamespaces()
+
++ Returns the XMPP namespace reserved for this particular type of file + transfer. |
+
Methods inherited from class org.jivesoftware.smackx.filetransfer.StreamNegotiator | +
---|
createError, createInitiationAccept |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public FaultTolerantNegotiator(XMPPConnection connection, + StreamNegotiator primary, + StreamNegotiator secondary)+
+Method Detail | +
---|
+public PacketFilter getInitiationPacketFilter(String from, + String streamID)+
StreamNegotiator
+
getInitiationPacketFilter
in class StreamNegotiator
from
- The initiatior of the file transfer.streamID
- The stream ID related to the transfer.
++public InputStream createIncomingStream(StreamInitiation initiation) + throws XMPPException+
StreamNegotiator
+
createIncomingStream
in class StreamNegotiator
initiation
- The initation that triggered this download.
+XMPPException
- If an error occurs during this process an XMPPException is
+ thrown.+public OutputStream createOutgoingStream(String streamID, + String initiator, + String target) + throws XMPPException+
StreamNegotiator
+
createOutgoingStream
in class StreamNegotiator
streamID
- The streamID that uniquely identifies the file transfer.initiator
- The fully-qualified JID of the initiator of the file transfer.target
- The fully-qualified JID of the target or reciever of the file
+ transfer.
+XMPPException
- If an error occurs during the negotiation process an
+ exception will be thrown.+public String[] getNamespaces()+
StreamNegotiator
+
getNamespaces
in class StreamNegotiator
+public void cleanup()+
StreamNegotiator
+
cleanup
in class StreamNegotiator
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransfer.Error +
public static class FileTransfer.Error
+
+Field Summary | +|
---|---|
+static FileTransfer.Error |
+BAD_FILE
+
++ The provided file to transfer does not exist or could not be read. |
+
+static FileTransfer.Error |
+CONNECTION
+
++ An error occured over the socket connected to send the file. |
+
+static FileTransfer.Error |
+NO_RESPONSE
+
++ The remote user did not respond or the connection timed out. |
+
+static FileTransfer.Error |
+NONE
+
++ No error |
+
+static FileTransfer.Error |
+NOT_ACCEPTABLE
+
++ The peer did not find any of the provided stream mechanisms + acceptable. |
+
+protected static FileTransfer.Error |
+STREAM
+
++ An error occured while sending or recieving the file |
+
+Method Summary | +|
---|---|
+ String |
+getMessage()
+
++ Returns a String representation of this error. |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static final FileTransfer.Error NONE+
+
+public static final FileTransfer.Error NOT_ACCEPTABLE+
+
+public static final FileTransfer.Error BAD_FILE+
+
+public static final FileTransfer.Error NO_RESPONSE+
+
+public static final FileTransfer.Error CONNECTION+
+
+protected static final FileTransfer.Error STREAM+
+
+Method Detail | +
---|
+public String getMessage()+
+
+public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransfer.Status +
public static class FileTransfer.Status
+A class to represent the current status of the file transfer. +
+ +
+
+Field Summary | +|
---|---|
+static FileTransfer.Status |
+CANCLED
+
++ The file transfer was canceled |
+
+static FileTransfer.Status |
+COMPLETE
+
++ The transfer has completed successfully. |
+
+static FileTransfer.Status |
+ERROR
+
++ An error occured during the transfer. |
+
+static FileTransfer.Status |
+IN_PROGRESS
+
++ The transfer is in progress. |
+
+static FileTransfer.Status |
+NEGOTIATED
+
++ After the stream negotitation has completed the intermediate state + between the time when the negotiation is finished and the actual + transfer begins. |
+
+static FileTransfer.Status |
+NEGOTIATING_STREAM
+
++ The stream to transfer the file is being negotiated over the chosen + stream type. |
+
+static FileTransfer.Status |
+NEGOTIATING_TRANSFER
+
++ The file transfer is being negotiated with the peer. |
+
+static FileTransfer.Status |
+REFUSED
+
++ The peer has refused the file transfer request halting the file + transfer negotiation process. |
+
+Constructor Summary | +|
---|---|
FileTransfer.Status()
+
++ |
+
+Method Summary | +
---|
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final FileTransfer.Status ERROR+
+
FileTransfer.getError()
+public static final FileTransfer.Status NEGOTIATING_TRANSFER+
+
NEGOTIATING_STREAM
+public static final FileTransfer.Status REFUSED+
+
+public static final FileTransfer.Status NEGOTIATING_STREAM+
+
NEGOTIATED
+public static final FileTransfer.Status NEGOTIATED+
+
+public static final FileTransfer.Status IN_PROGRESS+
+
FileTransfer.getProgress()
+public static final FileTransfer.Status COMPLETE+
+
+public static final FileTransfer.Status CANCLED+
+
+Constructor Detail | +
---|
+public FileTransfer.Status()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransfer +
public abstract class FileTransfer
+Contains the generic file information and progress related to a particular + file transfer. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+FileTransfer.Error
+
++ |
+
+static class |
+FileTransfer.Status
+
++ A class to represent the current status of the file transfer. |
+
+Field Summary | +|
---|---|
+protected long |
+amountWritten
+
++ |
+
+protected FileTransferNegotiator |
+negotiator
+
++ |
+
+protected String |
+streamID
+
++ |
+
+Constructor Summary | +|
---|---|
+protected |
+FileTransfer(String peer,
+ String streamID,
+ FileTransferNegotiator negotiator)
+
++ |
+
+Method Summary | +|
---|---|
+abstract void |
+cancel()
+
++ Cancels the file transfer. |
+
+ long |
+getAmountWritten()
+
++ Return the length of bytes written out to the stream. |
+
+ FileTransfer.Error |
+getError()
+
++ When getStatus() returns that there was an FileTransfer.Status.ERROR
+ during the transfer, the type of error can be retrieved through this
+ method. |
+
+ Exception |
+getException()
+
++ If an exception occurs asynchronously it will be stored for later + retrival. |
+
+ String |
+getFileName()
+
++ Returns the name of the file being transfered. |
+
+ String |
+getFilePath()
+
++ Returns the local path of the file. |
+
+ long |
+getFileSize()
+
++ Returns the size of the file being transfered. |
+
+ String |
+getPeer()
+
++ Returns the JID of the peer for this file transfer. |
+
+ double |
+getProgress()
+
++ Returns the progress of the file transfer as a number between 0 and 1. |
+
+ FileTransfer.Status |
+getStatus()
+
++ Retuns the current status of the file transfer. |
+
+ boolean |
+isDone()
+
++ Returns true if the transfer has been cancled, if it has stopped because + of a an error, or the transfer completed succesfully. |
+
+protected void |
+setError(FileTransfer.Error type)
+
++ |
+
+protected void |
+setException(Exception exception)
+
++ |
+
+protected void |
+setFileInfo(String fileName,
+ long fileSize)
+
++ |
+
+protected void |
+setFileInfo(String path,
+ String fileName,
+ long fileSize)
+
++ |
+
+protected void |
+setStatus(FileTransfer.Status status)
+
++ |
+
+protected void |
+writeToStream(InputStream in,
+ OutputStream out)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected FileTransferNegotiator negotiator+
+protected String streamID+
+protected long amountWritten+
+Constructor Detail | +
---|
+protected FileTransfer(String peer, + String streamID, + FileTransferNegotiator negotiator)+
+Method Detail | +
---|
+protected void setFileInfo(String fileName, + long fileSize)+
+protected void setFileInfo(String path, + String fileName, + long fileSize)+
+public long getFileSize()+
+
+public String getFileName()+
+
+public String getFilePath()+
+
+public String getPeer()+
+
+public double getProgress()+
+
+public boolean isDone()+
+
+public FileTransfer.Status getStatus()+
+
+protected void setError(FileTransfer.Error type)+
+public FileTransfer.Error getError()+
getStatus()
returns that there was an FileTransfer.Status.ERROR
+ during the transfer, the type of error can be retrieved through this
+ method.
++
+public Exception getException()+
+
getError()
+public abstract void cancel()+
+
+protected void setException(Exception exception)+
+protected final void setStatus(FileTransfer.Status status)+
+protected void writeToStream(InputStream in, + OutputStream out) + throws XMPPException+
XMPPException
+public long getAmountWritten()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface FileTransferListener
+File transfers can cause several events to be raised. These events can be + monitored through this interface. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+fileTransferRequest(FileTransferRequest request)
+
++ A request to send a file has been recieved from another user. |
+
+Method Detail | +
---|
+void fileTransferRequest(FileTransferRequest request)+
+
request
- The request from the other user.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransferManager +
public class FileTransferManager
+The file transfer manager class handles the sending and recieving of files.
+ To send a file invoke the createOutgoingFileTransfer(String)
method.
+
+ And to recieve a file add a file transfer listener to the manager. The
+ listener will notify you when there is a new file transfer request. To create
+ the IncomingFileTransfer
object accept the transfer, or, if the
+ transfer is not desirable reject it.
+
+ +
+
+Constructor Summary | +|
---|---|
FileTransferManager(XMPPConnection connection)
+
++ Creates a file transfer manager to initiate and receive file transfers. |
+
+Method Summary | +|
---|---|
+ void |
+addFileTransferListener(FileTransferListener li)
+
++ Add a file transfer listener to listen to incoming file transfer + requests. |
+
+protected IncomingFileTransfer |
+createIncomingFileTransfer(FileTransferRequest request)
+
++ When the file transfer request is acceptable, this method should be + invoked. |
+
+ OutgoingFileTransfer |
+createOutgoingFileTransfer(String userID)
+
++ Creates an OutgoingFileTransfer to send a file to another user. |
+
+protected void |
+fireNewRequest(StreamInitiation initiation)
+
++ |
+
+protected void |
+rejectIncomingFileTransfer(FileTransferRequest request)
+
++ |
+
+ void |
+removeFileTransferListener(FileTransferListener li)
+
++ Removes a file transfer listener. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public FileTransferManager(XMPPConnection connection)+
+
connection
- The XMPPConnection that the file transfers will use.+Method Detail | +
---|
+public void addFileTransferListener(FileTransferListener li)+
+
li
- The listenerremoveFileTransferListener(FileTransferListener)
,
+FileTransferListener
+protected void fireNewRequest(StreamInitiation initiation)+
+public void removeFileTransferListener(FileTransferListener li)+
+
li
- The file transfer listener to be removedFileTransferListener
+public OutgoingFileTransfer createOutgoingFileTransfer(String userID)+
+
userID
- The fully qualified jabber ID with resource of the user to
+ send the file to.
++protected IncomingFileTransfer createIncomingFileTransfer(FileTransferRequest request)+
+
request
- The remote request that is being accepted.
++protected void rejectIncomingFileTransfer(FileTransferRequest request)+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransferNegotiator +
public class FileTransferNegotiator
+Manages the negotiation of file transfers according to JEP-0096. If a file is + being sent the remote user chooses the type of stream under which the file + will be sent. +
+ +
+
+Field Summary | +|
---|---|
+static String |
+BYTE_STREAM
+
++ The XMPP namespace of the SOCKS5 bytestream |
+
+static boolean |
+IBB_ONLY
+
++ |
+
+static String |
+INBAND_BYTE_STREAM
+
++ The XMPP namespace of the In-Band bytestream |
+
+protected static String |
+STREAM_DATA_FIELD_NAME
+
++ |
+
+Method Summary | +|
---|---|
+protected static IQ |
+createIQ(String ID,
+ String to,
+ String from,
+ IQ.Type type)
+
++ A convience method to create an IQ packet. |
+
+static FileTransferNegotiator |
+getInstanceFor(XMPPConnection connection)
+
++ Returns the file transfer negotiator related to a particular connection. |
+
+ String |
+getNextStreamID()
+
++ Returns a new, unique, stream ID to identify a file transfer. |
+
+static Collection |
+getSupportedProtocols()
+
++ Returns a collection of the supported transfer protocols. |
+
+static boolean |
+isServiceEnabled(XMPPConnection connection)
+
++ Checks to see if all file transfer related services are enabled on the + connection. |
+
+ StreamNegotiator |
+negotiateOutgoingTransfer(String userID,
+ String streamID,
+ String fileName,
+ long size,
+ String desc,
+ int responseTimeout)
+
++ Send a request to another user to send them a file. |
+
+ void |
+rejectStream(StreamInitiation si)
+
++ Reject a stream initiation request from a remote user. |
+
+ StreamNegotiator |
+selectStreamNegotiator(FileTransferRequest request)
+
++ Selects an appropriate stream negotiator after examining the incoming file transfer request. |
+
+static void |
+setServiceEnabled(XMPPConnection connection,
+ boolean isEnabled)
+
++ Enable the Jabber services related to file transfer on the particular + connection. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String BYTE_STREAM+
+
+public static final String INBAND_BYTE_STREAM+
+
+protected static final String STREAM_DATA_FIELD_NAME+
+public static boolean IBB_ONLY+
+Method Detail | +
---|
+public static FileTransferNegotiator getInstanceFor(XMPPConnection connection)+
+
connection
- The connection for which the transfer manager is desired
++public static void setServiceEnabled(XMPPConnection connection, + boolean isEnabled)+
+
connection
- The connection on which to enable or disable the services.isEnabled
- True to enable, false to disable.+public static boolean isServiceEnabled(XMPPConnection connection)+
+
connection
- The connection to check
++protected static IQ createIQ(String ID, + String to, + String from, + IQ.Type type)+
+
ID
- The packet ID of theto
- To whom the packet is addressed.from
- From whom the packet is sent.type
- The iq type of the packet.
++public static Collection getSupportedProtocols()+
+
+public StreamNegotiator selectStreamNegotiator(FileTransferRequest request) + throws XMPPException+
+
request
- The related file transfer request.
+XMPPException
- If there are either no stream methods contained in the packet, or
+ there is not an appropriate stream method.+public void rejectStream(StreamInitiation si)+
+
si
- The Stream Initiation request to reject.+public String getNextStreamID()+
+
+public StreamNegotiator negotiateOutgoingTransfer(String userID, + String streamID, + String fileName, + long size, + String desc, + int responseTimeout) + throws XMPPException+
+
userID
- The userID of the user to whom the file will be sent.streamID
- The unique identifier for this file transfer.fileName
- The name of this file. Preferably it should include an
+ extension as it is used to determine what type of file it is.size
- The size, in bytes, of the file.desc
- A description of the file.responseTimeout
- The amount of time, in milliseconds, to wait for the remote
+ user to respond. If they do not respond in time, this
+XMPPException
- Thrown if there is an error negotiating the file transfer.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransferRequest +
public class FileTransferRequest
+A request to send a file recieved from another user. +
+ +
+
+Constructor Summary | +|
---|---|
FileTransferRequest(FileTransferManager manager,
+ StreamInitiation si)
+
++ A recieve request is constructed from the Stream Initiation request + received from the initator. |
+
+Method Summary | +|
---|---|
+ IncomingFileTransfer |
+accept()
+
++ Accepts this file transfer and creates the incoming file transfer. |
+
+ String |
+getDescription()
+
++ Returns the description of the file provided by the requestor. |
+
+ String |
+getFileName()
+
++ Returns the name of the file. |
+
+ long |
+getFileSize()
+
++ Returns the size in bytes of the file. |
+
+ String |
+getMimeType()
+
++ Returns the mime-type of the file. |
+
+ String |
+getRequestor()
+
++ Returns the fully-qualified jabber ID of the user that requested this + file transfer. |
+
+ String |
+getStreamID()
+
++ Returns the stream ID that uniquely identifies this file transfer. |
+
+protected StreamInitiation |
+getStreamInitiation()
+
++ Returns the stream initiation packet that was sent by the requestor which + contains the parameters of the file transfer being transfer and also the + methods available to transfer the file. |
+
+ void |
+reject()
+
++ Rejects the file transfer request. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public FileTransferRequest(FileTransferManager manager, + StreamInitiation si)+
+
manager
- The manager handling this file transfersi
- The Stream initiaton recieved from the initiator.+Method Detail | +
---|
+public String getFileName()+
+
+public long getFileSize()+
+
+public String getDescription()+
+
+public String getMimeType()+
+
+public String getRequestor()+
+
+public String getStreamID()+
+
+protected StreamInitiation getStreamInitiation()+
+
+public IncomingFileTransfer accept()+
+
+public void reject()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.StreamNegotiator +
org.jivesoftware.smackx.filetransfer.IBBTransferNegotiator +
public class IBBTransferNegotiator
+The in-band bytestream file transfer method, or IBB for short, transfers the + file over the same XML Stream used by XMPP. It is the fall-back mechanism in + case the SOCKS5 bytestream method of transfering files is not available. +
+ +
+
+Field Summary | +|
---|---|
+static int |
+DEFAULT_BLOCK_SIZE
+
++ |
+
+protected static String |
+NAMESPACE
+
++ |
+
+Constructor Summary | +|
---|---|
+protected |
+IBBTransferNegotiator(XMPPConnection connection)
+
++ The default constructor for the In-Band Bystream Negotiator. |
+
+Method Summary | +|
---|---|
+ void |
+cleanup()
+
++ Cleanup any and all resources associated with this negotiator. |
+
+ InputStream |
+createIncomingStream(StreamInitiation initiation)
+
++ This method handles the file stream download negotiation process. |
+
+ OutputStream |
+createOutgoingStream(String streamID,
+ String initiator,
+ String target)
+
++ This method handles the file upload stream negotiation process. |
+
+ PacketFilter |
+getInitiationPacketFilter(String from,
+ String streamID)
+
++ Returns the packet filter that will return the initiation packet for the appropriate stream + initiation. |
+
+ String[] |
+getNamespaces()
+
++ Returns the XMPP namespace reserved for this particular type of file + transfer. |
+
Methods inherited from class org.jivesoftware.smackx.filetransfer.StreamNegotiator | +
---|
createError, createInitiationAccept |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected static final String NAMESPACE+
+public static final int DEFAULT_BLOCK_SIZE+
+Constructor Detail | +
---|
+protected IBBTransferNegotiator(XMPPConnection connection)+
+
connection
- The connection which this negotiator works on.+Method Detail | +
---|
+public PacketFilter getInitiationPacketFilter(String from, + String streamID)+
StreamNegotiator
+
getInitiationPacketFilter
in class StreamNegotiator
from
- The initiatior of the file transfer.streamID
- The stream ID related to the transfer.
++public InputStream createIncomingStream(StreamInitiation initiation) + throws XMPPException+
StreamNegotiator
+
createIncomingStream
in class StreamNegotiator
initiation
- The initation that triggered this download.
+XMPPException
- If an error occurs during this process an XMPPException is
+ thrown.+public OutputStream createOutgoingStream(String streamID, + String initiator, + String target) + throws XMPPException+
StreamNegotiator
+
createOutgoingStream
in class StreamNegotiator
streamID
- The streamID that uniquely identifies the file transfer.initiator
- The fully-qualified JID of the initiator of the file transfer.target
- The fully-qualified JID of the target or reciever of the file
+ transfer.
+XMPPException
- If an error occurs during the negotiation process an
+ exception will be thrown.+public String[] getNamespaces()+
StreamNegotiator
+
getNamespaces
in class StreamNegotiator
+public void cleanup()+
StreamNegotiator
+
cleanup
in class StreamNegotiator
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransfer +
org.jivesoftware.smackx.filetransfer.IncomingFileTransfer +
public class IncomingFileTransfer
+An incoming file transfer is created when the
+ FileTransferManager.createIncomingFileTransfer(FileTransferRequest)
+ method is invoked. It is a file being sent to the local user from another
+ user on the jabber network. There are two stages of the file transfer to be
+ concerned with and they can be handled in different ways depending upon the
+ method that is invoked on this class.
+
recieveFile()
method. This method, negotiates the appropriate stream
+ method and then returns the InputStream to read the file
+ data from.
+
+ The second way that a file can be recieved through this class is by invoking
+ the recieveFile(File)
method. This method returns immediatly and
+ takes as its parameter a file on the local file system where the file
+ recieved from the transfer will be put.
++ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smackx.filetransfer.FileTransfer | +
---|
FileTransfer.Error, FileTransfer.Status |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smackx.filetransfer.FileTransfer | +
---|
amountWritten, negotiator, streamID |
+
+Constructor Summary | +|
---|---|
+protected |
+IncomingFileTransfer(FileTransferRequest request,
+ FileTransferNegotiator transferNegotiator)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+cancel()
+
++ Cancels the file transfer. |
+
+ InputStream |
+recieveFile()
+
++ Negotiates the stream method to transfer the file over and then returns + the negotiated stream. |
+
+ void |
+recieveFile(File file)
+
++ This method negotitates the stream and then transfer's the file over the + negotiated stream. |
+
Methods inherited from class org.jivesoftware.smackx.filetransfer.FileTransfer | +
---|
getAmountWritten, getError, getException, getFileName, getFilePath, getFileSize, getPeer, getProgress, getStatus, isDone, setError, setException, setFileInfo, setFileInfo, setStatus, writeToStream |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+protected IncomingFileTransfer(FileTransferRequest request, + FileTransferNegotiator transferNegotiator)+
+Method Detail | +
---|
+public InputStream recieveFile() + throws XMPPException+
+
XMPPException
- If there is an error in the negotiation process an exception
+ is thrown.+public void recieveFile(File file) + throws XMPPException+
+
file
- The location to save the file.
+XMPPException
+IllegalArgumentException
- This exception is thrown when the the provided file is
+ either null, or cannot be written to.+public void cancel()+
FileTransfer
+
cancel
in class FileTransfer
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer.NegotiationProgress +
public static class OutgoingFileTransfer.NegotiationProgress
+A callback class to retrive the status of an outgoing transfer + negotiation process. +
+ +
+
+Constructor Summary | +|
---|---|
OutgoingFileTransfer.NegotiationProgress()
+
++ |
+
+Method Summary | +|
---|---|
+ OutputStream |
+getOutputStream()
+
++ Once the negotiation process is completed the output stream can be + retrieved. |
+
+ FileTransfer.Status |
+getStatus()
+
++ Returns the current status of the negotiation process. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OutgoingFileTransfer.NegotiationProgress()+
+Method Detail | +
---|
+public FileTransfer.Status getStatus()+
+
+public OutputStream getOutputStream()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.FileTransfer +
org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer +
public class OutgoingFileTransfer
+Handles the sending of a file to another user. File transfer's in jabber have + several steps and there are several methods in this class that handle these + steps differently. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+OutgoingFileTransfer.NegotiationProgress
+
++ A callback class to retrive the status of an outgoing transfer + negotiation process. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smackx.filetransfer.FileTransfer | +
---|
FileTransfer.Error, FileTransfer.Status |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smackx.filetransfer.FileTransfer | +
---|
amountWritten, negotiator, streamID |
+
+Constructor Summary | +|
---|---|
+protected |
+OutgoingFileTransfer(String initiator,
+ String target,
+ String streamID,
+ FileTransferNegotiator transferNegotiator)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+cancel()
+
++ Cancels the file transfer. |
+
+ long |
+getBytesSent()
+
++ Returns the amount of bytes that have been sent for the file transfer. |
+
+protected OutputStream |
+getOutputStream()
+
++ Returns the output stream connected to the peer to transfer the file. |
+
+static int |
+getResponseTimeout()
+
++ Returns the time in milliseconds after which the file transfer + negotiation process will timeout if the other user has not responded. |
+
+ void |
+sendFile(File file,
+ String description)
+
++ This method handles the stream negotiation process and transmits the file + to the remote user. |
+
+ OutputStream |
+sendFile(String fileName,
+ long fileSize,
+ String description)
+
++ This method handles the negotiation of the file transfer and the stream, + it only returns the created stream after the negotiation has been completed. |
+
+ void |
+sendFile(String fileName,
+ long fileSize,
+ String description,
+ OutgoingFileTransfer.NegotiationProgress progress)
+
++ This methods handles the transfer and stream negotiation process. |
+
+protected void |
+setOutputStream(OutputStream stream)
+
++ |
+
+ void |
+setResponseTimeout(int responseTimeout)
+
++ Sets the time in milliseconds after which the file transfer negotiation + process will timeout if the other user has not responded. |
+
Methods inherited from class org.jivesoftware.smackx.filetransfer.FileTransfer | +
---|
getAmountWritten, getError, getException, getFileName, getFilePath, getFileSize, getPeer, getProgress, getStatus, isDone, setError, setException, setFileInfo, setFileInfo, setStatus, writeToStream |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+protected OutgoingFileTransfer(String initiator, + String target, + String streamID, + FileTransferNegotiator transferNegotiator)+
+Method Detail | +
---|
+public static int getResponseTimeout()+
+
+public void setResponseTimeout(int responseTimeout)+
+
responseTimeout
- The timeout time in milliseconds.+protected void setOutputStream(OutputStream stream)+
+protected OutputStream getOutputStream()+
StreamNegotiator
.
++
+public OutputStream sendFile(String fileName, + long fileSize, + String description) + throws XMPPException+
+
fileName
- The name of the file that will be transmitted. It is
+ preferable for this name to have an extension as it will be
+ used to determine the type of file it is.fileSize
- The size in bytes of the file that will be transmitted.description
- A description of the file that will be transmitted.
+XMPPException
- Thrown if an error occurs during the file transfer
+ negotiation process.+public void sendFile(String fileName, + long fileSize, + String description, + OutgoingFileTransfer.NegotiationProgress progress)+
OutgoingFileTransfer.NegotiationProgress
callback. When the negotiation process is
+ complete the OutputStream can be retrieved from the callback via the
+ OutgoingFileTransfer.NegotiationProgress.getOutputStream()
method.
++
fileName
- The name of the file that will be transmitted. It is
+ preferable for this name to have an extension as it will be
+ used to determine the type of file it is.fileSize
- The size in bytes of the file that will be transmitted.description
- A description of the file that will be transmitted.progress
- A callback to monitor the progress of the file transfer
+ negotiation process and to retrieve the OutputStream when it
+ is complete.+public void sendFile(File file, + String description) + throws XMPPException+
+
XMPPException
- If there is an error during the negotiation process or the
+ sending of the file.+public long getBytesSent()+
+ Note: This method is only useful when the sendFile(File, String)
+ method is called, as it is the only method that actualy transmits the
+ file.
+
+
+public void cancel()+
FileTransfer
+
cancel
in class FileTransfer
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.StreamNegotiator +
org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator +
public class Socks5TransferNegotiator
+A SOCKS5 bytestream is negotiated partly over the XMPP XML stream and partly + over a seperate socket. The actual transfer though takes place over a + seperatly created socket. +
+ A SOCKS5 file transfer generally has three parites, the initiator, the + target, and the stream host. The stream host is a specialized SOCKS5 proxy + setup on the server, or, the Initiator can act as the Stream Host if the + proxy is not available. + + The advantage of having a seperate proxy over directly connecting to + eachother is if the Initator and the Target are not on the same LAN and are + operating behind NAT, the proxy allows for a common location for both parties + to connect to and transfer the file. + + Smack will attempt to automatically discover any proxies present on your + server. If any are detected they will be forwarded to any user attempting to + recieve files from you. ++ +
+
+Field Summary | +|
---|---|
+static boolean |
+isAllowLocalProxyHost
+
++ |
+
+protected static String |
+NAMESPACE
+
++ |
+
+Constructor Summary | +|
---|---|
Socks5TransferNegotiator(XMPPConnection connection)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+cleanup()
+
++ Cleanup any and all resources associated with this negotiator. |
+
+ InputStream |
+createIncomingStream(StreamInitiation initiation)
+
++ This method handles the file stream download negotiation process. |
+
+ OutputStream |
+createOutgoingStream(String streamID,
+ String initiator,
+ String target)
+
++ This method handles the file upload stream negotiation process. |
+
+ PacketFilter |
+getInitiationPacketFilter(String from,
+ String sessionID)
+
++ Returns the packet filter that will return the initiation packet for the appropriate stream + initiation. |
+
+ String[] |
+getNamespaces()
+
++ Returns the XMPP namespace reserved for this particular type of file + transfer. |
+
Methods inherited from class org.jivesoftware.smackx.filetransfer.StreamNegotiator | +
---|
createError, createInitiationAccept |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected static final String NAMESPACE+
+public static boolean isAllowLocalProxyHost+
+Constructor Detail | +
---|
+public Socks5TransferNegotiator(XMPPConnection connection)+
+Method Detail | +
---|
+public PacketFilter getInitiationPacketFilter(String from, + String sessionID)+
StreamNegotiator
+
getInitiationPacketFilter
in class StreamNegotiator
from
- The initiatior of the file transfer.sessionID
- The stream ID related to the transfer.
++public InputStream createIncomingStream(StreamInitiation initiation) + throws XMPPException+
StreamNegotiator
+
createIncomingStream
in class StreamNegotiator
initiation
- The initation that triggered this download.
+XMPPException
- If an error occurs during this process an XMPPException is
+ thrown.+public OutputStream createOutgoingStream(String streamID, + String initiator, + String target) + throws XMPPException+
StreamNegotiator
+
createOutgoingStream
in class StreamNegotiator
streamID
- The streamID that uniquely identifies the file transfer.initiator
- The fully-qualified JID of the initiator of the file transfer.target
- The fully-qualified JID of the target or reciever of the file
+ transfer.
+XMPPException
- If an error occurs during the negotiation process an
+ exception will be thrown.+public String[] getNamespaces()+
StreamNegotiator
+
getNamespaces
in class StreamNegotiator
+public void cleanup()+
StreamNegotiator
+
cleanup
in class StreamNegotiator
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.filetransfer.StreamNegotiator +
public abstract class StreamNegotiator
+After the file transfer negotiation process is completed according to + JEP-0096, the negotation process is passed off to a particular stream + negotiator. The stream negotiator will then negotiate the chosen stream and + return the stream to transfer the file. +
+ +
+
+Constructor Summary | +|
---|---|
StreamNegotiator()
+
++ |
+
+Method Summary | +|
---|---|
+abstract void |
+cleanup()
+
++ Cleanup any and all resources associated with this negotiator. |
+
+ IQ |
+createError(String from,
+ String to,
+ String packetID,
+ XMPPError xmppError)
+
++ |
+
+abstract InputStream |
+createIncomingStream(StreamInitiation initiation)
+
++ This method handles the file stream download negotiation process. |
+
+ StreamInitiation |
+createInitiationAccept(StreamInitiation streamInitiationOffer,
+ String[] namespaces)
+
++ Creates the initiation acceptance packet to forward to the stream + initiator. |
+
+abstract OutputStream |
+createOutgoingStream(String streamID,
+ String initiator,
+ String target)
+
++ This method handles the file upload stream negotiation process. |
+
+abstract PacketFilter |
+getInitiationPacketFilter(String from,
+ String streamID)
+
++ Returns the packet filter that will return the initiation packet for the appropriate stream + initiation. |
+
+abstract String[] |
+getNamespaces()
+
++ Returns the XMPP namespace reserved for this particular type of file + transfer. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StreamNegotiator()+
+Method Detail | +
---|
+public StreamInitiation createInitiationAccept(StreamInitiation streamInitiationOffer, + String[] namespaces)+
+
streamInitiationOffer
- The offer from the stream initatior to connect for a stream.namespaces
- The namespace that relates to the accepted means of transfer.
++public IQ createError(String from, + String to, + String packetID, + XMPPError xmppError)+
+public abstract PacketFilter getInitiationPacketFilter(String from, + String streamID)+
+
from
- The initiatior of the file transfer.streamID
- The stream ID related to the transfer.
++public abstract InputStream createIncomingStream(StreamInitiation initiation) + throws XMPPException+
+
initiation
- The initation that triggered this download.
+XMPPException
- If an error occurs during this process an XMPPException is
+ thrown.+public abstract OutputStream createOutgoingStream(String streamID, + String initiator, + String target) + throws XMPPException+
+
streamID
- The streamID that uniquely identifies the file transfer.initiator
- The fully-qualified JID of the initiator of the file transfer.target
- The fully-qualified JID of the target or reciever of the file
+ transfer.
+XMPPException
- If an error occurs during the negotiation process an
+ exception will be thrown.+public abstract String[] getNamespaces()+
+
+public abstract void cleanup()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +FileTransferListener |
+
+Classes
+
+ +FaultTolerantNegotiator + +FileTransfer + +FileTransfer.Error + +FileTransfer.Status + +FileTransferManager + +FileTransferNegotiator + +FileTransferRequest + +IBBTransferNegotiator + +IncomingFileTransfer + +OutgoingFileTransfer + +OutgoingFileTransfer.NegotiationProgress + +Socks5TransferNegotiator + +StreamNegotiator |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Interface Summary | +|
---|---|
FileTransferListener | +File transfers can cause several events to be raised. | +
+ +
+Class Summary | +|
---|---|
FaultTolerantNegotiator | +The fault tolerant negotiator takes two stream negotiators, the primary and the secondary negotiator. | +
FileTransfer | +Contains the generic file information and progress related to a particular + file transfer. | +
FileTransfer.Error | ++ |
FileTransfer.Status | +A class to represent the current status of the file transfer. | +
FileTransferManager | +The file transfer manager class handles the sending and recieving of files. | +
FileTransferNegotiator | +Manages the negotiation of file transfers according to JEP-0096. | +
FileTransferRequest | +A request to send a file recieved from another user. | +
IBBTransferNegotiator | +The in-band bytestream file transfer method, or IBB for short, transfers the + file over the same XML Stream used by XMPP. | +
IncomingFileTransfer | +An incoming file transfer is created when the
+ FileTransferManager.createIncomingFileTransfer(FileTransferRequest)
+ method is invoked. |
+
OutgoingFileTransfer | +Handles the sending of a file to another user. | +
OutgoingFileTransfer.NegotiationProgress | +A callback class to retrive the status of an outgoing transfer + negotiation process. | +
Socks5TransferNegotiator | +A SOCKS5 bytestream is negotiated partly over the XMPP XML stream and partly + over a seperate socket. | +
StreamNegotiator | +After the file transfer negotiation process is completed according to + JEP-0096, the negotation process is passed off to a particular stream + negotiator. | +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.Affiliate +
public class Affiliate
+Represents an affiliation of a user to a given room. The affiliate's information will always have + the bare jid of the real user and its affiliation. If the affiliate is an occupant of the room + then we will also have information about the role and nickname of the user in the room. +
+ +
+
+Method Summary | +|
---|---|
+ String |
+getAffiliation()
+
++ Returns the affiliation of the afffiliated user. |
+
+ String |
+getJid()
+
++ Returns the bare JID of the affiliated user. |
+
+ String |
+getNick()
+
++ Returns the current nickname of the affiliated user if the user is currently in the room. |
+
+ String |
+getRole()
+
++ Returns the current role of the affiliated user if the user is currently in the room. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public String getJid()+
+
+public String getAffiliation()+
+
+public String getRole()+
+
+public String getNick()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.DeafOccupantInterceptor +
public class DeafOccupantInterceptor
+Packet interceptor that will intercept presence packets sent to the MUC service to indicate + that the user wants to be a deaf occupant. A user can only indicate that he wants to be a + deaf occupant while joining the room. It is not possible to become deaf or stop being deaf + after the user joined the room.
+
+ Deaf occupants will not get messages broadcasted to all room occupants. However, they will
+ be able to get private messages, presences, IQ packets or room history. To use this
+ functionality you will need to send the message
+ MultiUserChat.addPresenceInterceptor(org.jivesoftware.smack.PacketInterceptor)
and
+ pass this interceptor as the parameter.
+ + Note that this is a custom extension to the MUC service so it may not work with other servers + than Wildfire. +
+ +
+
+Constructor Summary | +|
---|---|
DeafOccupantInterceptor()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+interceptPacket(Packet packet)
+
++ Process the packet that is about to be sent to the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DeafOccupantInterceptor()+
+Method Detail | +
---|
+public void interceptPacket(Packet packet)+
PacketInterceptor
+ + Interceptors are invoked using the same thread that requested the packet + to be sent, so it's very important that implementations of this method + not block for any extended period of time. +
+
interceptPacket
in interface PacketInterceptor
packet
- the packet to is going to be sent to the server.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.DefaultParticipantStatusListener +
public class DefaultParticipantStatusListener
+Default implementation of the ParticipantStatusListener interface.
+ + This class does not provide any behavior by default. It just avoids having + to implement all the inteface methods if the user is only interested in implementing + some of the methods. +
+ +
+
+Constructor Summary | +|
---|---|
DefaultParticipantStatusListener()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+adminGranted(String participant)
+
++ Called when an owner grants administrator privileges to a user. |
+
+ void |
+adminRevoked(String participant)
+
++ Called when an owner revokes administrator privileges from a user. |
+
+ void |
+banned(String participant,
+ String actor,
+ String reason)
+
++ Called when an administrator or owner banned a participant from the room. |
+
+ void |
+joined(String participant)
+
++ Called when a new room occupant has joined the room. |
+
+ void |
+kicked(String participant,
+ String actor,
+ String reason)
+
++ Called when a room participant has been kicked from the room. |
+
+ void |
+left(String participant)
+
++ Called when a room occupant has left the room on its own. |
+
+ void |
+membershipGranted(String participant)
+
++ Called when an administrator grants a user membership to the room. |
+
+ void |
+membershipRevoked(String participant)
+
++ Called when an administrator revokes a user membership to the room. |
+
+ void |
+moderatorGranted(String participant)
+
++ Called when an administrator grants moderator privileges to a user. |
+
+ void |
+moderatorRevoked(String participant)
+
++ Called when an administrator revokes moderator privileges from a user. |
+
+ void |
+nicknameChanged(String participant,
+ String newNickname)
+
++ Called when a participant changed his/her nickname in the room. |
+
+ void |
+ownershipGranted(String participant)
+
++ Called when an owner grants a user ownership on the room. |
+
+ void |
+ownershipRevoked(String participant)
+
++ Called when an owner revokes a user ownership on the room. |
+
+ void |
+voiceGranted(String participant)
+
++ Called when a moderator grants voice to a visitor. |
+
+ void |
+voiceRevoked(String participant)
+
++ Called when a moderator revokes voice from a participant. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DefaultParticipantStatusListener()+
+Method Detail | +
---|
+public void joined(String participant)+
ParticipantStatusListener
+
joined
in interface ParticipantStatusListener
participant
- the participant that has just joined the room
+ (e.g. room@conference.jabber.org/nick).+public void left(String participant)+
ParticipantStatusListener
+
left
in interface ParticipantStatusListener
participant
- the participant that has left the room on its own.
+ (e.g. room@conference.jabber.org/nick).+public void kicked(String participant, + String actor, + String reason)+
ParticipantStatusListener
+
kicked
in interface ParticipantStatusListener
participant
- the participant that was kicked from the room
+ (e.g. room@conference.jabber.org/nick).actor
- the moderator that kicked the occupant from the room (e.g. user@host.org).reason
- the reason provided by the actor to kick the occupant from the room.+public void voiceGranted(String participant)+
ParticipantStatusListener
+
voiceGranted
in interface ParticipantStatusListener
participant
- the participant that was granted voice in the room
+ (e.g. room@conference.jabber.org/nick).+public void voiceRevoked(String participant)+
ParticipantStatusListener
+
voiceRevoked
in interface ParticipantStatusListener
participant
- the participant that was revoked voice from the room
+ (e.g. room@conference.jabber.org/nick).+public void banned(String participant, + String actor, + String reason)+
ParticipantStatusListener
+
banned
in interface ParticipantStatusListener
participant
- the participant that was banned from the room
+ (e.g. room@conference.jabber.org/nick).actor
- the administrator that banned the occupant (e.g. user@host.org).reason
- the reason provided by the administrator to ban the occupant.+public void membershipGranted(String participant)+
ParticipantStatusListener
+
membershipGranted
in interface ParticipantStatusListener
participant
- the participant that was granted membership in the room
+ (e.g. room@conference.jabber.org/nick).+public void membershipRevoked(String participant)+
ParticipantStatusListener
+
membershipRevoked
in interface ParticipantStatusListener
participant
- the participant that was revoked membership from the room
+ (e.g. room@conference.jabber.org/nick).+public void moderatorGranted(String participant)+
ParticipantStatusListener
+
moderatorGranted
in interface ParticipantStatusListener
participant
- the participant that was granted moderator privileges in the room
+ (e.g. room@conference.jabber.org/nick).+public void moderatorRevoked(String participant)+
ParticipantStatusListener
+
moderatorRevoked
in interface ParticipantStatusListener
participant
- the participant that was revoked moderator privileges in the room
+ (e.g. room@conference.jabber.org/nick).+public void ownershipGranted(String participant)+
ParticipantStatusListener
+
ownershipGranted
in interface ParticipantStatusListener
participant
- the participant that was granted ownership on the room
+ (e.g. room@conference.jabber.org/nick).+public void ownershipRevoked(String participant)+
ParticipantStatusListener
+
ownershipRevoked
in interface ParticipantStatusListener
participant
- the participant that was revoked ownership on the room
+ (e.g. room@conference.jabber.org/nick).+public void adminGranted(String participant)+
ParticipantStatusListener
+
adminGranted
in interface ParticipantStatusListener
participant
- the participant that was granted administrator privileges
+ (e.g. room@conference.jabber.org/nick).+public void adminRevoked(String participant)+
ParticipantStatusListener
+
adminRevoked
in interface ParticipantStatusListener
participant
- the participant that was revoked administrator privileges
+ (e.g. room@conference.jabber.org/nick).+public void nicknameChanged(String participant, + String newNickname)+
ParticipantStatusListener
+
nicknameChanged
in interface ParticipantStatusListener
participant
- the participant that was revoked administrator privileges
+ (e.g. room@conference.jabber.org/nick).newNickname
- the new nickname that the participant decided to use.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.DefaultUserStatusListener +
public class DefaultUserStatusListener
+Default implementation of the UserStatusListener interface.
+ + This class does not provide any behavior by default. It just avoids having + to implement all the inteface methods if the user is only interested in implementing + some of the methods. +
+ +
+
+Constructor Summary | +|
---|---|
DefaultUserStatusListener()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+adminGranted()
+
++ Called when an owner grants administrator privileges to your user. |
+
+ void |
+adminRevoked()
+
++ Called when an owner revokes administrator privileges from your user. |
+
+ void |
+banned(String actor,
+ String reason)
+
++ Called when an administrator or owner banned your user from the room. |
+
+ void |
+kicked(String actor,
+ String reason)
+
++ Called when a moderator kicked your user from the room. |
+
+ void |
+membershipGranted()
+
++ Called when an administrator grants your user membership to the room. |
+
+ void |
+membershipRevoked()
+
++ Called when an administrator revokes your user membership to the room. |
+
+ void |
+moderatorGranted()
+
++ Called when an administrator grants moderator privileges to your user. |
+
+ void |
+moderatorRevoked()
+
++ Called when an administrator revokes moderator privileges from your user. |
+
+ void |
+ownershipGranted()
+
++ Called when an owner grants to your user ownership on the room. |
+
+ void |
+ownershipRevoked()
+
++ Called when an owner revokes from your user ownership on the room. |
+
+ void |
+voiceGranted()
+
++ Called when a moderator grants voice to your user. |
+
+ void |
+voiceRevoked()
+
++ Called when a moderator revokes voice from your user. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DefaultUserStatusListener()+
+Method Detail | +
---|
+public void kicked(String actor, + String reason)+
UserStatusListener
+
kicked
in interface UserStatusListener
actor
- the moderator that kicked your user from the room (e.g. user@host.org).reason
- the reason provided by the actor to kick you from the room.+public void voiceGranted()+
UserStatusListener
+
voiceGranted
in interface UserStatusListener
+public void voiceRevoked()+
UserStatusListener
+
voiceRevoked
in interface UserStatusListener
+public void banned(String actor, + String reason)+
UserStatusListener
+
banned
in interface UserStatusListener
actor
- the administrator that banned your user (e.g. user@host.org).reason
- the reason provided by the administrator to banned you.+public void membershipGranted()+
UserStatusListener
+
membershipGranted
in interface UserStatusListener
+public void membershipRevoked()+
UserStatusListener
+
membershipRevoked
in interface UserStatusListener
+public void moderatorGranted()+
UserStatusListener
+
moderatorGranted
in interface UserStatusListener
+public void moderatorRevoked()+
UserStatusListener
+
moderatorRevoked
in interface UserStatusListener
+public void ownershipGranted()+
UserStatusListener
+
ownershipGranted
in interface UserStatusListener
+public void ownershipRevoked()+
UserStatusListener
+
ownershipRevoked
in interface UserStatusListener
+public void adminGranted()+
UserStatusListener
+
adminGranted
in interface UserStatusListener
+public void adminRevoked()+
UserStatusListener
+
adminRevoked
in interface UserStatusListener
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.DiscussionHistory +
public class DiscussionHistory
+The DiscussionHistory class controls the number of characters or messages to receive + when entering a room. The room will decide the amount of history to return if you don't + specify a DiscussionHistory while joining a room.
+ + You can use some or all of these variable to control the amount of history to receive: +
+ +
+
+Constructor Summary | +|
---|---|
DiscussionHistory()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+getMaxChars()
+
++ Returns the total number of characters to receive in the history. |
+
+ int |
+getMaxStanzas()
+
++ Returns the total number of messages to receive in the history. |
+
+ int |
+getSeconds()
+
++ Returns the number of seconds to use to filter the messages received during that time. |
+
+ Date |
+getSince()
+
++ Returns the since date to use to filter the messages received during that time. |
+
+ void |
+setMaxChars(int maxChars)
+
++ Sets the total number of characters to receive in the history. |
+
+ void |
+setMaxStanzas(int maxStanzas)
+
++ Sets the total number of messages to receive in the history. |
+
+ void |
+setSeconds(int seconds)
+
++ Sets the number of seconds to use to filter the messages received during that time. |
+
+ void |
+setSince(Date since)
+
++ Sets the since date to use to filter the messages received during that time. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DiscussionHistory()+
+Method Detail | +
---|
+public int getMaxChars()+
+
+public int getMaxStanzas()+
+
+public int getSeconds()+
+
+public Date getSince()+
+
+public void setMaxChars(int maxChars)+
+
maxChars
- the total number of characters to receive in the history.+public void setMaxStanzas(int maxStanzas)+
+
maxStanzas
- the total number of messages to receive in the history.+public void setSeconds(int seconds)+
+
seconds
- the number of seconds to use to filter the messages received during
+ that time.+public void setSince(Date since)+
+
since
- the since date to use to filter the messages received during that time.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.HostedRoom +
public class HostedRoom
+Hosted rooms by a chat service may be discovered if they are configured to appear in the room
+ directory . The information that may be discovered is the XMPP address of the room and the room
+ name. The address of the room may be used for obtaining more detailed information
+ MultiUserChat.getRoomInfo(org.jivesoftware.smack.XMPPConnection, String)
+ or could be used for joining the room
+ MultiUserChat.MultiUserChat(org.jivesoftware.smack.XMPPConnection, String)
+ and MultiUserChat.join(String)
.
+
+ +
+
+Constructor Summary | +|
---|---|
HostedRoom(DiscoverItems.Item item)
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getJid()
+
++ Returns the XMPP address of the hosted room by the chat service. |
+
+ String |
+getName()
+
++ Returns the name of the room. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public HostedRoom(DiscoverItems.Item item)+
+Method Detail | +
---|
+public String getJid()+
MultiUserChat
when joining a room.
++
+public String getName()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface InvitationListener
+A listener that is fired anytime an invitation to join a MUC room is received. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+invitationReceived(XMPPConnection conn,
+ String room,
+ String inviter,
+ String reason,
+ String password,
+ Message message)
+
++ Called when the an invitation to join a MUC room is received. |
+
+Method Detail | +
---|
+void invitationReceived(XMPPConnection conn, + String room, + String inviter, + String reason, + String password, + Message message)+
+ + If the room is password-protected, the invitee will receive a password to use to join + the room. If the room is members-only, the the invitee may be added to the member list. +
+
conn
- the XMPPConnection that received the invitation.room
- the room that invitation refers to.inviter
- the inviter that sent the invitation. (e.g. crone1@shakespeare.lit).reason
- the reason why the inviter sent the invitation.password
- the password to use when joining the room.message
- the message used by the inviter to send the invitation.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface InvitationRejectionListener
+A listener that is fired anytime an invitee declines or rejects an invitation. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+invitationDeclined(String invitee,
+ String reason)
+
++ Called when the invitee declines the invitation. |
+
+Method Detail | +
---|
+void invitationDeclined(String invitee, + String reason)+
+
invitee
- the invitee that declined the invitation. (e.g. hecate@shakespeare.lit).reason
- the reason why the invitee declined the invitation.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.MultiUserChat +
public class MultiUserChat
+A MultiUserChat is a conversation that takes place among many users in a virtual + room. A room could have many occupants with different affiliation and roles. + Possible affiliatons are "owner", "admin", "member", and "outcast". Possible roles + are "moderator", "participant", and "visitor". Each role and affiliation guarantees + different privileges (e.g. Send messages to all occupants, Kick participants and visitors, + Grant voice, Edit member list, etc.). +
+ +
+
+Constructor Summary | +|
---|---|
MultiUserChat(XMPPConnection connection,
+ String room)
+
++ Creates a new multi user chat with the specified connection and room name. |
+
+Method Summary | +|
---|---|
+static void |
+addInvitationListener(XMPPConnection conn,
+ InvitationListener listener)
+
++ Adds a listener to invitation notifications. |
+
+ void |
+addInvitationRejectionListener(InvitationRejectionListener listener)
+
++ Adds a listener to invitation rejections notifications. |
+
+ void |
+addMessageListener(PacketListener listener)
+
++ Adds a packet listener that will be notified of any new messages in the + group chat. |
+
+ void |
+addParticipantListener(PacketListener listener)
+
++ Adds a packet listener that will be notified of any new Presence packets + sent to the group chat. |
+
+ void |
+addParticipantStatusListener(ParticipantStatusListener listener)
+
++ Adds a listener that will be notified of changes in occupants status in the room + such as the user being kicked, banned, or granted admin permissions. |
+
+ void |
+addPresenceInterceptor(PacketInterceptor presenceInterceptor)
+
++ Adds a new PacketInterceptor that will be invoked every time a new presence
+ is going to be sent by this MultiUserChat to the server. |
+
+ void |
+addSubjectUpdatedListener(SubjectUpdatedListener listener)
+
++ Adds a listener to subject change notifications. |
+
+ void |
+addUserStatusListener(UserStatusListener listener)
+
++ Adds a listener that will be notified of changes in your status in the room + such as the user being kicked, banned, or granted admin permissions. |
+
+ void |
+banUser(String jid,
+ String reason)
+
++ Bans a user from the room. |
+
+ void |
+banUsers(Collection jids)
+
++ Bans users from the room. |
+
+ void |
+changeAvailabilityStatus(String status,
+ Presence.Mode mode)
+
++ Changes the occupant's availability status within the room. |
+
+ void |
+changeNickname(String nickname)
+
++ Changes the occupant's nickname to a new nickname within the room. |
+
+ void |
+changeSubject(String subject)
+
++ Changes the subject within the room. |
+
+ void |
+create(String nickname)
+
++ Creates the room according to some default configuration, assign the requesting user + as the room owner, and add the owner to the room but not allow anyone else to enter + the room (effectively "locking" the room). |
+
+ Message |
+createMessage()
+
++ Creates a new Message to send to the chat room. |
+
+ Chat |
+createPrivateChat(String occupant)
+
++ Returns a new Chat for sending private messages to a given room occupant. |
+
+static void |
+decline(XMPPConnection conn,
+ String room,
+ String inviter,
+ String reason)
+
++ Informs the sender of an invitation that the invitee declines the invitation. |
+
+ void |
+destroy(String reason,
+ String alternateJID)
+
++ Sends a request to the server to destroy the room. |
+
+ void |
+finalize()
+
++ |
+
+ Collection |
+getAdmins()
+
++ Returns a collection of Affiliate with the room administrators. |
+
+ Form |
+getConfigurationForm()
+
++ Returns the room's configuration form that the room's owner can use or null if + no configuration is possible. |
+
+static Collection |
+getHostedRooms(XMPPConnection connection,
+ String serviceName)
+
++ Returns a collection of HostedRooms where each HostedRoom has the XMPP address of the room + and the room's name. |
+
+static Iterator |
+getJoinedRooms(XMPPConnection connection,
+ String user)
+
++ Returns an Iterator on the rooms where the requested user has joined. |
+
+ Collection |
+getMembers()
+
++ Returns a collection of Affiliate with the room members. |
+
+ Collection |
+getModerators()
+
++ Returns a collection of Occupant with the room moderators. |
+
+ String |
+getNickname()
+
++ Returns the nickname that was used to join the room, or null if not + currently joined. |
+
+ Occupant |
+getOccupant(String user)
+
++ Returns the Occupant information for a particular occupant, or null if the + user is not in the room. |
+
+ Presence |
+getOccupantPresence(String user)
+
++ Returns the presence info for a particular user, or null if the user + is not in the room. |
+
+ Iterator |
+getOccupants()
+
++ Returns an Iterator (of Strings) for the list of fully qualified occupants + in the group chat. |
+
+ int |
+getOccupantsCount()
+
++ Returns the number of occupants in the group chat. |
+
+ Collection |
+getOutcasts()
+
++ Returns a collection of Affiliate with the room outcasts. |
+
+ Collection |
+getOwners()
+
++ Returns a collection of Affiliate with the room owners. |
+
+ Collection |
+getParticipants()
+
++ Returns a collection of Occupant with the room participants. |
+
+ Form |
+getRegistrationForm()
+
++ Returns the room's registration form that an unaffiliated user, can use to become a member + of the room or null if no registration is possible. |
+
+ String |
+getReservedNickname()
+
++ Returns the reserved room nickname for the user in the room. |
+
+ String |
+getRoom()
+
++ Returns the name of the room this MultiUserChat object represents. |
+
+static RoomInfo |
+getRoomInfo(XMPPConnection connection,
+ String room)
+
++ Returns the discovered information of a given room without actually having to join the room. |
+
+static Collection |
+getServiceNames(XMPPConnection connection)
+
++ Returns a collection with the XMPP addresses of the Multi-User Chat services. |
+
+ String |
+getSubject()
+
++ Returns the last known room's subject or null if the user hasn't joined the room + or the room does not have a subject yet. |
+
+ void |
+grantAdmin(Collection jids)
+
++ Grants administrator privileges to other users. |
+
+ void |
+grantAdmin(String jid)
+
++ Grants administrator privileges to another user. |
+
+ void |
+grantMembership(Collection jids)
+
++ Grants membership to other users. |
+
+ void |
+grantMembership(String jid)
+
++ Grants membership to a user. |
+
+ void |
+grantModerator(Collection nicknames)
+
++ Grants moderator privileges to participants or visitors. |
+
+ void |
+grantModerator(String nickname)
+
++ Grants moderator privileges to a participant or visitor. |
+
+ void |
+grantOwnership(Collection jids)
+
++ Grants ownership privileges to other users. |
+
+ void |
+grantOwnership(String jid)
+
++ Grants ownership privileges to another user. |
+
+ void |
+grantVoice(Collection nicknames)
+
++ Grants voice to visitors in the room. |
+
+ void |
+grantVoice(String nickname)
+
++ Grants voice to a visitor in the room. |
+
+ void |
+invite(Message message,
+ String user,
+ String reason)
+
++ Invites another user to the room in which one is an occupant using a given Message. |
+
+ void |
+invite(String user,
+ String reason)
+
++ Invites another user to the room in which one is an occupant. |
+
+ boolean |
+isJoined()
+
++ Returns true if currently in the multi user chat (after calling the join(String) method). |
+
+static boolean |
+isServiceEnabled(XMPPConnection connection,
+ String user)
+
++ Returns true if the specified user supports the Multi-User Chat protocol. |
+
+ void |
+join(String nickname)
+
++ Joins the chat room using the specified nickname. |
+
+ void |
+join(String nickname,
+ String password)
+
++ Joins the chat room using the specified nickname and password. |
+
+ void |
+join(String nickname,
+ String password,
+ DiscussionHistory history,
+ long timeout)
+
++ Joins the chat room using the specified nickname and password. |
+
+ void |
+kickParticipant(String nickname,
+ String reason)
+
++ Kicks a visitor or participant from the room. |
+
+ void |
+leave()
+
++ Leave the chat room. |
+
+ Message |
+nextMessage()
+
++ Returns the next available message in the chat. |
+
+ Message |
+nextMessage(long timeout)
+
++ Returns the next available message in the chat. |
+
+ Message |
+pollMessage()
+
++ Polls for and returns the next message, or null if there isn't + a message immediately available. |
+
+static void |
+removeInvitationListener(XMPPConnection conn,
+ InvitationListener listener)
+
++ Removes a listener to invitation notifications. |
+
+ void |
+removeInvitationRejectionListener(InvitationRejectionListener listener)
+
++ Removes a listener from invitation rejections notifications. |
+
+ void |
+removeMessageListener(PacketListener listener)
+
++ Removes a packet listener that was being notified of any new messages in the + multi user chat. |
+
+ void |
+removeParticipantListener(PacketListener listener)
+
++ Remoces a packet listener that was being notified of any new Presence packets + sent to the group chat. |
+
+ void |
+removeParticipantStatusListener(ParticipantStatusListener listener)
+
++ Removes a listener that was being notified of changes in occupants status in the room + such as the user being kicked, banned, or granted admin permissions. |
+
+ void |
+removePresenceInterceptor(PacketInterceptor presenceInterceptor)
+
++ Removes a PacketInterceptor that was being invoked every time a new presence
+ was being sent by this MultiUserChat to the server. |
+
+ void |
+removeSubjectUpdatedListener(SubjectUpdatedListener listener)
+
++ Removes a listener from subject change notifications. |
+
+ void |
+removeUserStatusListener(UserStatusListener listener)
+
++ Removes a listener that was being notified of changes in your status in the room + such as the user being kicked, banned, or granted admin permissions. |
+
+ void |
+revokeAdmin(Collection jids)
+
++ Revokes administrator privileges from users. |
+
+ void |
+revokeAdmin(String jid)
+
++ Revokes administrator privileges from a user. |
+
+ void |
+revokeMembership(Collection jids)
+
++ Revokes users' membership. |
+
+ void |
+revokeMembership(String jid)
+
++ Revokes a user's membership. |
+
+ void |
+revokeModerator(Collection nicknames)
+
++ Revokes moderator privileges from other users. |
+
+ void |
+revokeModerator(String nickname)
+
++ Revokes moderator privileges from another user. |
+
+ void |
+revokeOwnership(Collection jids)
+
++ Revokes ownership privileges from other users. |
+
+ void |
+revokeOwnership(String jid)
+
++ Revokes ownership privileges from another user. |
+
+ void |
+revokeVoice(Collection nicknames)
+
++ Revokes voice from participants in the room. |
+
+ void |
+revokeVoice(String nickname)
+
++ Revokes voice from a participant in the room. |
+
+ void |
+sendConfigurationForm(Form form)
+
++ Sends the completed configuration form to the server. |
+
+ void |
+sendMessage(Message message)
+
++ Sends a Message to the chat room. |
+
+ void |
+sendMessage(String text)
+
++ Sends a message to the chat room. |
+
+ void |
+sendRegistrationForm(Form form)
+
++ Sends the completed registration form to the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MultiUserChat(XMPPConnection connection, + String room)+
join
the chat room. On some server implementations,
+ the room will not be created until the first person joins it.+ + Most XMPP servers use a sub-domain for the chat service (eg chat.example.com + for the XMPP server example.com). You must ensure that the room address you're + trying to connect to includes the proper chat sub-domain. +
+
connection
- the XMPP connection.room
- the name of the room in the form "roomName@service", where
+ "service" is the hostname at which the multi-user chat
+ service is running. Make sure to provide a valid JID.+Method Detail | +
---|
+public static boolean isServiceEnabled(XMPPConnection connection, + String user)+
+
connection
- the connection to use to perform the service discovery.user
- the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com.
++public static Iterator getJoinedRooms(XMPPConnection connection, + String user)+
+
connection
- the connection to use to perform the service discovery.user
- the user to check. A fully qualified xmpp ID, e.g. jdoe@example.com.
++public static RoomInfo getRoomInfo(XMPPConnection connection, + String room) + throws XMPPException+
+
connection
- the XMPP connection to use for discovering information about the room.room
- the name of the room in the form "roomName@service" of which we want to discover
+ its information.
+XMPPException
- if an error occured while trying to discover information of a room.+public static Collection getServiceNames(XMPPConnection connection) + throws XMPPException+
+
connection
- the XMPP connection to use for discovering Multi-User Chat services.
+XMPPException
- if an error occured while trying to discover MUC services.+public static Collection getHostedRooms(XMPPConnection connection, + String serviceName) + throws XMPPException+
+
connection
- the XMPP connection to use for discovering hosted rooms by the MUC service.serviceName
- the service that is hosting the rooms to discover.
+XMPPException
- if an error occured while trying to discover the information.+public String getRoom()+
+
+public void create(String nickname) + throws XMPPException+
+
+ To create an "Instant Room", that means a room with some default configuration that is
+ available for immediate access, the room's owner should send an empty form after creating
+ the room. sendConfigurationForm(Form)
+
+ To create a "Reserved Room", that means a room manually configured by the room creator
+ before anyone is allowed to enter, the room's owner should complete and send a form after
+ creating the room. Once the completed configutation form is sent to the server, the server
+ will unlock the room. sendConfigurationForm(Form)
+
+
nickname
- the nickname to use.
+XMPPException
- if the room couldn't be created for some reason
+ (e.g. room already exists; user already joined to an existant room or
+ 405 error if the user is not allowed to create the room)+public void join(String nickname) + throws XMPPException+
+
nickname
- the nickname to use.
+XMPPException
- if an error occurs joining the room. In particular, a
+ 401 error can occur if no password was provided and one is required; or a
+ 403 error can occur if the user is banned; or a
+ 404 error can occur if the room does not exist or is locked; or a
+ 407 error can occur if user is not on the member list; or a
+ 409 error can occur if someone is already in the group chat with the same nickname.+public void join(String nickname, + String password) + throws XMPPException+
+ + A password is required when joining password protected rooms. If the room does + not require a password there is no need to provide one. +
+
nickname
- the nickname to use.password
- the password to use.
+XMPPException
- if an error occurs joining the room. In particular, a
+ 401 error can occur if no password was provided and one is required; or a
+ 403 error can occur if the user is banned; or a
+ 404 error can occur if the room does not exist or is locked; or a
+ 407 error can occur if user is not on the member list; or a
+ 409 error can occur if someone is already in the group chat with the same nickname.+public void join(String nickname, + String password, + DiscussionHistory history, + long timeout) + throws XMPPException+
+ + To control the amount of history to receive while joining a room you will need to provide + a configured DiscussionHistory object.
+ + A password is required when joining password protected rooms. If the room does + not require a password there is no need to provide one.
+ + If the room does not already exist when the user seeks to enter it, the server will + decide to create a new room or not. +
+
nickname
- the nickname to use.password
- the password to use.history
- the amount of discussion history to receive while joining a room.timeout
- the amount of time to wait for a reply from the MUC service(in milleseconds).
+XMPPException
- if an error occurs joining the room. In particular, a
+ 401 error can occur if no password was provided and one is required; or a
+ 403 error can occur if the user is banned; or a
+ 404 error can occur if the room does not exist or is locked; or a
+ 407 error can occur if user is not on the member list; or a
+ 409 error can occur if someone is already in the group chat with the same nickname.+public boolean isJoined()+
join(String)
method).
++
+public void leave()+
+
+public Form getConfigurationForm() + throws XMPPException+
+
XMPPException
- if an error occurs asking the configuration form for the room.+public void sendConfigurationForm(Form form) + throws XMPPException+
+
form
- the form with the new settings.
+XMPPException
- if an error occurs setting the new rooms' configuration.+public Form getRegistrationForm() + throws XMPPException+
+ + If the user requesting registration requirements is not allowed to register with the room + (e.g. because that privilege has been restricted), the room will return a "Not Allowed" + error to the user (error code 405). +
+
XMPPException
- if an error occurs asking the registration form for the room or a
+ 405 error if the user is not allowed to register with the room.+public void sendRegistrationForm(Form form) + throws XMPPException+
+ + If the desired room nickname is already reserved for that room, the room will return a + "Conflict" error to the user (error code 409). If the room does not support registration, + it will return a "Service Unavailable" error to the user (error code 503). +
+
form
- the completed registration form.
+XMPPException
- if an error occurs submitting the registration form. In particular, a
+ 409 error can occur if the desired room nickname is already reserved for that room;
+ or a 503 error can occur if the room does not support registration.+public void destroy(String reason, + String alternateJID) + throws XMPPException+
+
reason
- the reason for the room destruction.alternateJID
- the JID of an alternate location.
+XMPPException
- if an error occurs while trying to destroy the room.
+ An error can occur which will be wrapped by an XMPPException --
+ XMPP error code 403. The error code can be used to present more
+ appropiate error messages to end-users.+public void invite(String user, + String reason)+
+ + If the room is password-protected, the invitee will receive a password to use to join + the room. If the room is members-only, the the invitee may be added to the member list. +
+
user
- the user to invite to the room.(e.g. hecate@shakespeare.lit)reason
- the reason why the user is being invited.+public void invite(Message message, + String user, + String reason)+
+ + If the room is password-protected, the invitee will receive a password to use to join + the room. If the room is members-only, the the invitee may be added to the member list. +
+
message
- the message to use for sending the invitation.user
- the user to invite to the room.(e.g. hecate@shakespeare.lit)reason
- the reason why the user is being invited.+public static void decline(XMPPConnection conn, + String room, + String inviter, + String reason)+
+
conn
- the connection to use for sending the rejection.room
- the room that sent the original invitation.inviter
- the inviter of the declined invitation.reason
- the reason why the invitee is declining the invitation.+public static void addInvitationListener(XMPPConnection conn, + InvitationListener listener)+
+
conn
- the connection where the listener will be applied.listener
- an invitation listener.+public static void removeInvitationListener(XMPPConnection conn, + InvitationListener listener)+
+
conn
- the connection where the listener was applied.listener
- an invitation listener.+public void addInvitationRejectionListener(InvitationRejectionListener listener)+
+
listener
- an invitation rejection listener.+public void removeInvitationRejectionListener(InvitationRejectionListener listener)+
+
listener
- an invitation rejection listener.+public void addSubjectUpdatedListener(SubjectUpdatedListener listener)+
+
listener
- a subject updated listener.+public void removeSubjectUpdatedListener(SubjectUpdatedListener listener)+
+
listener
- a subject updated listener.+public void addPresenceInterceptor(PacketInterceptor presenceInterceptor)+
PacketInterceptor
that will be invoked every time a new presence
+ is going to be sent by this MultiUserChat to the server. Packet interceptors may
+ add new extensions to the presence that is going to be sent to the MUC service.
++
presenceInterceptor
- the new packet interceptor that will intercept presence packets.+public void removePresenceInterceptor(PacketInterceptor presenceInterceptor)+
PacketInterceptor
that was being invoked every time a new presence
+ was being sent by this MultiUserChat to the server. Packet interceptors may
+ add new extensions to the presence that is going to be sent to the MUC service.
++
presenceInterceptor
- the packet interceptor to remove.+public String getSubject()+
+
+ To be notified every time the room's subject change you should add a listener
+ to this room. addSubjectUpdatedListener(SubjectUpdatedListener)
+
+ To change the room's subject use changeSubject(String)
.
+
+
+public String getReservedNickname()+
+
+public String getNickname()+
+
+public void changeNickname(String nickname) + throws XMPPException+
+
nickname
- the new nickname within the room.
+XMPPException
- if the new nickname is already in use by another occupant.+public void changeAvailabilityStatus(String status, + Presence.Mode mode)+
+
status
- a text message describing the presence update.mode
- the mode type for the presence update.+public void kickParticipant(String nickname, + String reason) + throws XMPPException+
+
nickname
- the nickname of the participant or visitor to kick from the room
+ (e.g. "john").reason
- the reason why the participant or visitor is being kicked from the room.
+XMPPException
- if an error occurs kicking the occupant. In particular, a
+ 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin"
+ was intended to be kicked (i.e. Not Allowed error); or a
+ 403 error can occur if the occupant that intended to kick another occupant does
+ not have kicking privileges (i.e. Forbidden error); or a
+ 400 error can occur if the provided nickname is not present in the room.+public void grantVoice(Collection nicknames) + throws XMPPException+
+
nicknames
- the nicknames of the visitors to grant voice in the room (e.g. "john").
+XMPPException
- if an error occurs granting voice to a visitor. In particular, a
+ 403 error can occur if the occupant that intended to grant voice is not
+ a moderator in this room (i.e. Forbidden error); or a
+ 400 error can occur if the provided nickname is not present in the room.+public void grantVoice(String nickname) + throws XMPPException+
+
nickname
- the nickname of the visitor to grant voice in the room (e.g. "john").
+XMPPException
- if an error occurs granting voice to a visitor. In particular, a
+ 403 error can occur if the occupant that intended to grant voice is not
+ a moderator in this room (i.e. Forbidden error); or a
+ 400 error can occur if the provided nickname is not present in the room.+public void revokeVoice(Collection nicknames) + throws XMPPException+
+
nicknames
- the nicknames of the participants to revoke voice (e.g. "john").
+XMPPException
- if an error occurs revoking voice from a participant. In particular, a
+ 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin"
+ was tried to revoke his voice (i.e. Not Allowed error); or a
+ 400 error can occur if the provided nickname is not present in the room.+public void revokeVoice(String nickname) + throws XMPPException+
+
nickname
- the nickname of the participant to revoke voice (e.g. "john").
+XMPPException
- if an error occurs revoking voice from a participant. In particular, a
+ 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin"
+ was tried to revoke his voice (i.e. Not Allowed error); or a
+ 400 error can occur if the provided nickname is not present in the room.+public void banUsers(Collection jids) + throws XMPPException+
+
jids
- the bare XMPP user IDs of the users to ban.
+XMPPException
- if an error occurs banning a user. In particular, a
+ 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin"
+ was tried to be banned (i.e. Not Allowed error).+public void banUser(String jid, + String reason) + throws XMPPException+
+
jid
- the bare XMPP user ID of the user to ban (e.g. "user@host.org").reason
- the reason why the user was banned.
+XMPPException
- if an error occurs banning a user. In particular, a
+ 405 error can occur if a moderator or a user with an affiliation of "owner" or "admin"
+ was tried to be banned (i.e. Not Allowed error).+public void grantMembership(Collection jids) + throws XMPPException+
+
jids
- the XMPP user IDs of the users to grant membership.
+XMPPException
- if an error occurs granting membership to a user.+public void grantMembership(String jid) + throws XMPPException+
+
jid
- the XMPP user ID of the user to grant membership (e.g. "user@host.org").
+XMPPException
- if an error occurs granting membership to a user.+public void revokeMembership(Collection jids) + throws XMPPException+
+
jids
- the bare XMPP user IDs of the users to revoke membership.
+XMPPException
- if an error occurs revoking membership to a user.+public void revokeMembership(String jid) + throws XMPPException+
+
jid
- the bare XMPP user ID of the user to revoke membership (e.g. "user@host.org").
+XMPPException
- if an error occurs revoking membership to a user.+public void grantModerator(Collection nicknames) + throws XMPPException+
+
nicknames
- the nicknames of the occupants to grant moderator privileges.
+XMPPException
- if an error occurs granting moderator privileges to a user.+public void grantModerator(String nickname) + throws XMPPException+
+
nickname
- the nickname of the occupant to grant moderator privileges.
+XMPPException
- if an error occurs granting moderator privileges to a user.+public void revokeModerator(Collection nicknames) + throws XMPPException+
+
nicknames
- the nicknames of the occupants to revoke moderator privileges.
+XMPPException
- if an error occurs revoking moderator privileges from a user.+public void revokeModerator(String nickname) + throws XMPPException+
+
nickname
- the nickname of the occupant to revoke moderator privileges.
+XMPPException
- if an error occurs revoking moderator privileges from a user.+public void grantOwnership(Collection jids) + throws XMPPException+
+
jids
- the collection of bare XMPP user IDs of the users to grant ownership.
+XMPPException
- if an error occurs granting ownership privileges to a user.+public void grantOwnership(String jid) + throws XMPPException+
+
jid
- the bare XMPP user ID of the user to grant ownership (e.g. "user@host.org").
+XMPPException
- if an error occurs granting ownership privileges to a user.+public void revokeOwnership(Collection jids) + throws XMPPException+
+
jids
- the bare XMPP user IDs of the users to revoke ownership.
+XMPPException
- if an error occurs revoking ownership privileges from a user.+public void revokeOwnership(String jid) + throws XMPPException+
+
jid
- the bare XMPP user ID of the user to revoke ownership (e.g. "user@host.org").
+XMPPException
- if an error occurs revoking ownership privileges from a user.+public void grantAdmin(Collection jids) + throws XMPPException+
+
jids
- the bare XMPP user IDs of the users to grant administrator privileges.
+XMPPException
- if an error occurs granting administrator privileges to a user.+public void grantAdmin(String jid) + throws XMPPException+
+
jid
- the bare XMPP user ID of the user to grant administrator privileges
+ (e.g. "user@host.org").
+XMPPException
- if an error occurs granting administrator privileges to a user.+public void revokeAdmin(Collection jids) + throws XMPPException+
+
jids
- the bare XMPP user IDs of the user to revoke administrator privileges.
+XMPPException
- if an error occurs revoking administrator privileges from a user.+public void revokeAdmin(String jid) + throws XMPPException+
+
jid
- the bare XMPP user ID of the user to revoke administrator privileges
+ (e.g. "user@host.org").
+XMPPException
- if an error occurs revoking administrator privileges from a user.+public int getOccupantsCount()+
+ + Note: this value will only be accurate after joining the group chat, and + may fluctuate over time. If you query this value directly after joining the + group chat it may not be accurate, as it takes a certain amount of time for + the server to send all presence packets to this client. +
+
+public Iterator getOccupants()+
StringUtils.parseResource(String)
method.
+ Note: this value will only be accurate after joining the group chat, and may
+ fluctuate over time.
++
+public Presence getOccupantPresence(String user)+
+
+
user
- the room occupant to search for his presence. The format of user must
+ be: roomName@service/nickname (e.g. darkcave@macbeth.shakespeare.lit/thirdwitch).
++public Occupant getOccupant(String user)+
+
+
user
- the room occupant to search for his presence. The format of user must
+ be: roomName@service/nickname (e.g. darkcave@macbeth.shakespeare.lit/thirdwitch).
++public void addParticipantListener(PacketListener listener)+
+
listener
- a packet listener that will be notified of any presence packets
+ sent to the group chat.+public void removeParticipantListener(PacketListener listener)+
+
listener
- a packet listener that was being notified of any presence packets
+ sent to the group chat.+public Collection getOwners() + throws XMPPException+
Affiliate
with the room owners.
++
Affiliate
with the room owners.
+XMPPException
- if an error occured while performing the request to the server or you
+ don't have enough privileges to get this information.+public Collection getAdmins() + throws XMPPException+
Affiliate
with the room administrators.
++
Affiliate
with the room administrators.
+XMPPException
- if an error occured while performing the request to the server or you
+ don't have enough privileges to get this information.+public Collection getMembers() + throws XMPPException+
Affiliate
with the room members.
++
Affiliate
with the room members.
+XMPPException
- if an error occured while performing the request to the server or you
+ don't have enough privileges to get this information.+public Collection getOutcasts() + throws XMPPException+
Affiliate
with the room outcasts.
++
Affiliate
with the room outcasts.
+XMPPException
- if an error occured while performing the request to the server or you
+ don't have enough privileges to get this information.+public Collection getModerators() + throws XMPPException+
Occupant
with the room moderators.
++
Occupant
with the room moderators.
+XMPPException
- if an error occured while performing the request to the server or you
+ don't have enough privileges to get this information.+public Collection getParticipants() + throws XMPPException+
Occupant
with the room participants.
++
Occupant
with the room participants.
+XMPPException
- if an error occured while performing the request to the server or you
+ don't have enough privileges to get this information.+public void sendMessage(String text) + throws XMPPException+
+
text
- the text of the message to send.
+XMPPException
- if sending the message fails.+public Chat createPrivateChat(String occupant)+
+
occupant
- occupant unique room JID (e.g. 'darkcave@macbeth.shakespeare.lit/Paul').
++public Message createMessage()+
+
+public void sendMessage(Message message) + throws XMPPException+
+
message
- the message.
+XMPPException
- if sending the message fails.+public Message pollMessage()+
nextMessage()
method since it's non-blocking.
+ In other words, the method call will always return immediately, whereas the
+ nextMessage method will return only when a message is available (or after
+ a specific timeout).
++
+public Message nextMessage()+
+
+public Message nextMessage(long timeout)+
+
timeout
- the maximum amount of time to wait for the next message.
++public void addMessageListener(PacketListener listener)+
+
listener
- a packet listener.+public void removeMessageListener(PacketListener listener)+
+
listener
- a packet listener.+public void changeSubject(String subject) + throws XMPPException+
+
subject
- the new room's subject to set.
+XMPPException
- if someone without appropriate privileges attempts to change the
+ room subject will throw an error with code 403 (i.e. Forbidden)+public void addUserStatusListener(UserStatusListener listener)+
+
listener
- a user status listener.+public void removeUserStatusListener(UserStatusListener listener)+
+
listener
- a user status listener.+public void addParticipantStatusListener(ParticipantStatusListener listener)+
+
listener
- a participant status listener.+public void removeParticipantStatusListener(ParticipantStatusListener listener)+
+
listener
- a participant status listener.+public void finalize() + throws Throwable+
finalize
in class Object
Throwable
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.Occupant +
public class Occupant
+Represents the information about an occupant in a given room. The information will always have + the affiliation and role of the occupant in the room. The full JID and nickname are optional. +
+ +
+
+Method Summary | +|
---|---|
+ String |
+getAffiliation()
+
++ Returns the affiliation of the occupant. |
+
+ String |
+getJid()
+
++ Returns the full JID of the occupant. |
+
+ String |
+getNick()
+
++ Returns the current nickname of the occupant in the room. |
+
+ String |
+getRole()
+
++ Returns the current role of the occupant in the room. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public String getJid()+
+
+public String getAffiliation()+
+
+public String getRole()+
+
+public String getNick()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface ParticipantStatusListener
+A listener that is fired anytime a participant's status in a room is changed, such as the + user being kicked, banned, or granted admin permissions. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+adminGranted(String participant)
+
++ Called when an owner grants administrator privileges to a user. |
+
+ void |
+adminRevoked(String participant)
+
++ Called when an owner revokes administrator privileges from a user. |
+
+ void |
+banned(String participant,
+ String actor,
+ String reason)
+
++ Called when an administrator or owner banned a participant from the room. |
+
+ void |
+joined(String participant)
+
++ Called when a new room occupant has joined the room. |
+
+ void |
+kicked(String participant,
+ String actor,
+ String reason)
+
++ Called when a room participant has been kicked from the room. |
+
+ void |
+left(String participant)
+
++ Called when a room occupant has left the room on its own. |
+
+ void |
+membershipGranted(String participant)
+
++ Called when an administrator grants a user membership to the room. |
+
+ void |
+membershipRevoked(String participant)
+
++ Called when an administrator revokes a user membership to the room. |
+
+ void |
+moderatorGranted(String participant)
+
++ Called when an administrator grants moderator privileges to a user. |
+
+ void |
+moderatorRevoked(String participant)
+
++ Called when an administrator revokes moderator privileges from a user. |
+
+ void |
+nicknameChanged(String participant,
+ String newNickname)
+
++ Called when a participant changed his/her nickname in the room. |
+
+ void |
+ownershipGranted(String participant)
+
++ Called when an owner grants a user ownership on the room. |
+
+ void |
+ownershipRevoked(String participant)
+
++ Called when an owner revokes a user ownership on the room. |
+
+ void |
+voiceGranted(String participant)
+
++ Called when a moderator grants voice to a visitor. |
+
+ void |
+voiceRevoked(String participant)
+
++ Called when a moderator revokes voice from a participant. |
+
+Method Detail | +
---|
+void joined(String participant)+
+
participant
- the participant that has just joined the room
+ (e.g. room@conference.jabber.org/nick).+void left(String participant)+
+
participant
- the participant that has left the room on its own.
+ (e.g. room@conference.jabber.org/nick).+void kicked(String participant, + String actor, + String reason)+
+
participant
- the participant that was kicked from the room
+ (e.g. room@conference.jabber.org/nick).actor
- the moderator that kicked the occupant from the room (e.g. user@host.org).reason
- the reason provided by the actor to kick the occupant from the room.+void voiceGranted(String participant)+
+
participant
- the participant that was granted voice in the room
+ (e.g. room@conference.jabber.org/nick).+void voiceRevoked(String participant)+
+
participant
- the participant that was revoked voice from the room
+ (e.g. room@conference.jabber.org/nick).+void banned(String participant, + String actor, + String reason)+
+
participant
- the participant that was banned from the room
+ (e.g. room@conference.jabber.org/nick).actor
- the administrator that banned the occupant (e.g. user@host.org).reason
- the reason provided by the administrator to ban the occupant.+void membershipGranted(String participant)+
+
participant
- the participant that was granted membership in the room
+ (e.g. room@conference.jabber.org/nick).+void membershipRevoked(String participant)+
+
participant
- the participant that was revoked membership from the room
+ (e.g. room@conference.jabber.org/nick).+void moderatorGranted(String participant)+
+
participant
- the participant that was granted moderator privileges in the room
+ (e.g. room@conference.jabber.org/nick).+void moderatorRevoked(String participant)+
+
participant
- the participant that was revoked moderator privileges in the room
+ (e.g. room@conference.jabber.org/nick).+void ownershipGranted(String participant)+
+
participant
- the participant that was granted ownership on the room
+ (e.g. room@conference.jabber.org/nick).+void ownershipRevoked(String participant)+
+
participant
- the participant that was revoked ownership on the room
+ (e.g. room@conference.jabber.org/nick).+void adminGranted(String participant)+
+
participant
- the participant that was granted administrator privileges
+ (e.g. room@conference.jabber.org/nick).+void adminRevoked(String participant)+
+
participant
- the participant that was revoked administrator privileges
+ (e.g. room@conference.jabber.org/nick).+void nicknameChanged(String participant, + String newNickname)+
+
participant
- the participant that was revoked administrator privileges
+ (e.g. room@conference.jabber.org/nick).newNickname
- the new nickname that the participant decided to use.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.muc.RoomInfo +
public class RoomInfo
+Represents the room information that was discovered using Service Discovery. It's possible to + obtain information about a room before joining the room but only for rooms that are public (i.e. + rooms that may be discovered). +
+ +
+
+Method Summary | +|
---|---|
+ String |
+getDescription()
+
++ Returns the discovered description of the room. |
+
+ int |
+getOccupantsCount()
+
++ Returns the discovered number of occupants that are currently in the room. |
+
+ String |
+getRoom()
+
++ Returns the JID of the room whose information was discovered. |
+
+ String |
+getSubject()
+
++ Returns the discovered subject of the room. |
+
+ boolean |
+isMembersOnly()
+
++ Returns true if the room has restricted the access so that only members may enter the room. |
+
+ boolean |
+isModerated()
+
++ Returns true if the room enabled only participants to speak. |
+
+ boolean |
+isNonanonymous()
+
++ Returns true if presence packets will include the JID of every occupant. |
+
+ boolean |
+isPasswordProtected()
+
++ Returns true if users musy provide a valid password in order to join the room. |
+
+ boolean |
+isPersistent()
+
++ Returns true if the room will persist after the last occupant have left the room. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public String getRoom()+
+
+public String getDescription()+
+
+public String getSubject()+
+
+public int getOccupantsCount()+
+
+public boolean isMembersOnly()+
+
+public boolean isModerated()+
+
+public boolean isNonanonymous()+
+
+public boolean isPasswordProtected()+
+
+public boolean isPersistent()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface SubjectUpdatedListener
+A listener that is fired anytime a MUC room changes its subject. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+subjectUpdated(String subject,
+ String from)
+
++ Called when a MUC room has changed its subject. |
+
+Method Detail | +
---|
+void subjectUpdated(String subject, + String from)+
+
subject
- the new room's subject.from
- the user that changed the room's subject (e.g. room@conference.jabber.org/nick).
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface UserStatusListener
+A listener that is fired anytime your participant's status in a room is changed, such as the + user being kicked, banned, or granted admin permissions. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+adminGranted()
+
++ Called when an owner grants administrator privileges to your user. |
+
+ void |
+adminRevoked()
+
++ Called when an owner revokes administrator privileges from your user. |
+
+ void |
+banned(String actor,
+ String reason)
+
++ Called when an administrator or owner banned your user from the room. |
+
+ void |
+kicked(String actor,
+ String reason)
+
++ Called when a moderator kicked your user from the room. |
+
+ void |
+membershipGranted()
+
++ Called when an administrator grants your user membership to the room. |
+
+ void |
+membershipRevoked()
+
++ Called when an administrator revokes your user membership to the room. |
+
+ void |
+moderatorGranted()
+
++ Called when an administrator grants moderator privileges to your user. |
+
+ void |
+moderatorRevoked()
+
++ Called when an administrator revokes moderator privileges from your user. |
+
+ void |
+ownershipGranted()
+
++ Called when an owner grants to your user ownership on the room. |
+
+ void |
+ownershipRevoked()
+
++ Called when an owner revokes from your user ownership on the room. |
+
+ void |
+voiceGranted()
+
++ Called when a moderator grants voice to your user. |
+
+ void |
+voiceRevoked()
+
++ Called when a moderator revokes voice from your user. |
+
+Method Detail | +
---|
+void kicked(String actor, + String reason)+
+
actor
- the moderator that kicked your user from the room (e.g. user@host.org).reason
- the reason provided by the actor to kick you from the room.+void voiceGranted()+
+
+void voiceRevoked()+
+
+void banned(String actor, + String reason)+
+
actor
- the administrator that banned your user (e.g. user@host.org).reason
- the reason provided by the administrator to banned you.+void membershipGranted()+
+
+void membershipRevoked()+
+
+void moderatorGranted()+
+
+void moderatorRevoked()+
+
+void ownershipGranted()+
+
+void ownershipRevoked()+
+
+void adminGranted()+
+
+void adminRevoked()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +InvitationListener + +InvitationRejectionListener + +ParticipantStatusListener + +SubjectUpdatedListener + +UserStatusListener |
+
+Classes
+
+ +Affiliate + +DeafOccupantInterceptor + +DefaultParticipantStatusListener + +DefaultUserStatusListener + +DiscussionHistory + +HostedRoom + +MultiUserChat + +Occupant + +RoomInfo |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
InvitationListener | +A listener that is fired anytime an invitation to join a MUC room is received. | +
InvitationRejectionListener | +A listener that is fired anytime an invitee declines or rejects an invitation. | +
ParticipantStatusListener | +A listener that is fired anytime a participant's status in a room is changed, such as the + user being kicked, banned, or granted admin permissions. | +
SubjectUpdatedListener | +A listener that is fired anytime a MUC room changes its subject. | +
UserStatusListener | +A listener that is fired anytime your participant's status in a room is changed, such as the + user being kicked, banned, or granted admin permissions. | +
+ +
+Class Summary | +|
---|---|
Affiliate | +Represents an affiliation of a user to a given room. | +
DeafOccupantInterceptor | +Packet interceptor that will intercept presence packets sent to the MUC service to indicate + that the user wants to be a deaf occupant. | +
DefaultParticipantStatusListener | +Default implementation of the ParticipantStatusListener interface. | +
DefaultUserStatusListener | +Default implementation of the UserStatusListener interface. | +
DiscussionHistory | +The DiscussionHistory class controls the number of characters or messages to receive + when entering a room. | +
HostedRoom | +Hosted rooms by a chat service may be discovered if they are configured to appear in the room + directory . | +
MultiUserChat | +A MultiUserChat is a conversation that takes place among many users in a virtual + room. | +
Occupant | +Represents the information about an occupant in a given room. | +
RoomInfo | +Represents the room information that was discovered using Service Discovery. | +
+Classes and Interfaces that implement Multi-User Chat (MUC). +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Interfaces
+
+ +MessageEventNotificationListener + +MessageEventRequestListener + +NodeInformationProvider + +RosterExchangeListener |
+
+Classes
+
+ +DefaultMessageEventRequestListener + +Form + +FormField + +FormField.Option + +GroupChatInvitation + +GroupChatInvitation.Provider + +MessageEventManager + +MultipleRecipientInfo + +MultipleRecipientManager + +OfflineMessageHeader + +OfflineMessageManager + +PrivateDataManager + +PrivateDataManager.PrivateDataIQProvider + +RemoteRosterEntry + +ReportedData + +ReportedData.Column + +ReportedData.Field + +ReportedData.Row + +RosterExchangeManager + +ServiceDiscoveryManager + +SharedGroupManager + +XHTMLManager + +XHTMLText |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
MessageEventNotificationListener | +A listener that is fired anytime a message event notification is received. | +
MessageEventRequestListener | +A listener that is fired anytime a message event request is received. | +
NodeInformationProvider | +The NodeInformationProvider is responsible for providing information (i.e. | +
RosterExchangeListener | +A listener that is fired anytime a roster exchange is received. | +
+ +
+Class Summary | +|
---|---|
DefaultMessageEventRequestListener | +Default implementation of the MessageEventRequestListener interface. | +
Form | +Represents a Form for gathering data. | +
FormField | +Represents a field of a form. | +
FormField.Option | +Represents the available option of a given FormField. | +
GroupChatInvitation | +A group chat invitation packet extension, which is used to invite other + users to a group chat room. | +
GroupChatInvitation.Provider | ++ |
MessageEventManager | +Manages message events requests and notifications. | +
MultipleRecipientInfo | +MultipleRecipientInfo keeps information about the multiple recipients extension included + in a received packet. | +
MultipleRecipientManager | +A MultipleRecipientManager allows to send packets to multiple recipients by making use of + JEP-33: Extended Stanza Addressing. | +
OfflineMessageHeader | +The OfflineMessageHeader holds header information of an offline message. | +
OfflineMessageManager | +The OfflineMessageManager helps manage offline messages even before the user has sent an + available presence. | +
PrivateDataManager | +Manages private data, which is a mechanism to allow users to store arbitrary XML + data on an XMPP server. | +
PrivateDataManager.PrivateDataIQProvider | +An IQ provider to parse IQ results containing private data. | +
RemoteRosterEntry | +Represents a roster item, which consists of a JID and , their name and + the groups the roster item belongs to. | +
ReportedData | +Represents a set of data results returned as part of a search. | +
ReportedData.Column | +Represents the columns definition of the reported data. | +
ReportedData.Field | ++ |
ReportedData.Row | ++ |
RosterExchangeManager | +Manages Roster exchanges. | +
ServiceDiscoveryManager | +Manages discovery of services in XMPP entities. | +
SharedGroupManager | +A SharedGroupManager provides services for discovering the shared groups where a user belongs. | +
XHTMLManager | +Manages XHTML formatted texts within messages. | +
XHTMLText | +An XHTMLText represents formatted text. | +
+Smack extensions API. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.Bytestream.Activate +
public static class Bytestream.Activate
+The packet sent by the stream initiator to the stream proxy to activate + the connection. +
+ +
+
+Field Summary | +|
---|---|
+static String |
+ELEMENTNAME
+
++ |
+
+ String |
+NAMESPACE
+
++ |
+
+Constructor Summary | +|
---|---|
Bytestream.Activate(String target)
+
++ Default constructor specifying the target of the stream. |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+getTarget()
+
++ Returns the target of the activation. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public String NAMESPACE+
+public static String ELEMENTNAME+
+Constructor Detail | +
---|
+public Bytestream.Activate(String target)+
+
target
- The target of the stream.+Method Detail | +
---|
+public String getTarget()+
+
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.Bytestream.Mode +
public static class Bytestream.Mode
+The stream can be either a TCP stream or a UDP stream. +
+ +
+
+Field Summary | +|
---|---|
+static Bytestream.Mode |
+TCP
+
++ A TCP based stream. |
+
+static Bytestream.Mode |
+UDP
+
++ A UDP based stream. |
+
+Method Summary | +|
---|---|
+ boolean |
+equals(Object obj)
+
++ |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+public static Bytestream.Mode TCP+
+
+public static Bytestream.Mode UDP+
+
+Method Detail | +
---|
+public String toString()+
toString
in class Object
+public boolean equals(Object obj)+
equals
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.Bytestream.StreamHost +
public static class Bytestream.StreamHost
+Packet extension that represents a potential Socks5 proxy for the file + transfer. Stream hosts are forwared to the target of the file transfer + who then chooses and connects to one. +
+ +
+
+Field Summary | +|
---|---|
+static String |
+ELEMENTNAME
+
++ |
+
+static String |
+NAMESPACE
+
++ |
+
+Constructor Summary | +|
---|---|
Bytestream.StreamHost(String JID,
+ String address)
+
++ Default constructor. |
+
+Method Summary | +|
---|---|
+ String |
+getAddress()
+
++ Returns the internet address of the stream host. |
+
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getJID()
+
++ Returns the jabber ID of the stream host. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ int |
+getPort()
+
++ Returns the port on which the potential stream host would accept the + connection. |
+
+ void |
+setPort(int port)
+
++ Sets the port of the stream host. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static String NAMESPACE+
+public static String ELEMENTNAME+
+Constructor Detail | +
---|
+public Bytestream.StreamHost(String JID, + String address)+
+
JID
- The jabber ID of the stream host.address
- The internet address of the stream host.+Method Detail | +
---|
+public String getJID()+
+
+public String getAddress()+
+
+public void setPort(int port)+
+
port
- The port on which the potential stream host would accept
+ the connection.+public int getPort()+
+
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.Bytestream.StreamHostUsed +
public static class Bytestream.StreamHostUsed
+After selected a Socks5 stream host and successfully connecting, the + target of the file transfer returns a byte stream packet with the stream + host used extension. +
+ +
+
+Field Summary | +|
---|---|
+static String |
+ELEMENTNAME
+
++ |
+
+ String |
+NAMESPACE
+
++ |
+
+Constructor Summary | +|
---|---|
Bytestream.StreamHostUsed(String JID)
+
++ Default constructor. |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getJID()
+
++ Returns the jabber ID of the selected stream host. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public String NAMESPACE+
+public static String ELEMENTNAME+
+Constructor Detail | +
---|
+public Bytestream.StreamHostUsed(String JID)+
+
JID
- The jabber ID of the selected stream host.+Method Detail | +
---|
+public String getJID()+
+
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.Bytestream +
public class Bytestream
+A packet representing part of a Socks5 Bytestream negotiation. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+Bytestream.Activate
+
++ The packet sent by the stream initiator to the stream proxy to activate + the connection. |
+
+static class |
+Bytestream.Mode
+
++ The stream can be either a TCP stream or a UDP stream. |
+
+static class |
+Bytestream.StreamHost
+
++ Packet extension that represents a potential Socks5 proxy for the file + transfer. |
+
+static class |
+Bytestream.StreamHostUsed
+
++ After selected a Socks5 stream host and successfully connecting, the + target of the file transfer returns a byte stream packet with the stream + host used extension. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Bytestream()
+
++ The default constructor |
+|
Bytestream(String SID)
+
++ A constructor where the session ID can be specified. |
+
+Method Summary | +|
---|---|
+ void |
+addStreamHost(Bytestream.StreamHost host)
+
++ Adds a potential stream host that the remote user can transfer the file + through. |
+
+ Bytestream.StreamHost |
+addStreamHost(String JID,
+ String address)
+
++ Adds a potential stream host that the remote user can connect to to + receive the file. |
+
+ Bytestream.StreamHost |
+addStreamHost(String JID,
+ String address,
+ int port)
+
++ Adds a potential stream host that the remote user can connect to to + receive the file. |
+
+ int |
+countStreamHosts()
+
++ Returns the count of stream hosts contained in this packet. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ Bytestream.Mode |
+getMode()
+
++ Returns the transport mode. |
+
+ String |
+getSessionID()
+
++ Returns the session ID related to the Byte Stream negotiation. |
+
+ Bytestream.StreamHost |
+getStreamHost(String JID)
+
++ Returns the stream host related to the given jabber ID, or null if there + is none. |
+
+ Collection |
+getStreamHosts()
+
++ Returns the list of stream hosts contained in the packet. |
+
+ Bytestream.Activate |
+getToActivate()
+
++ Returns the activate element of the packet sent to the proxy host to + verify the identity of the initiator and match them to the appropriate + stream. |
+
+ Bytestream.StreamHostUsed |
+getUsedHost()
+
++ Returns the Socks5 host connected to by the remote user. |
+
+ void |
+setMode(Bytestream.Mode mode)
+
++ Set the transport mode. |
+
+ void |
+setSessionID(String sessionID)
+
++ Set the session ID related to the Byte Stream. |
+
+ void |
+setToActivate(String targetID)
+
++ Upon the response from the target of the used host the activate packet is + sent to the Socks5 proxy. |
+
+ void |
+setUsedHost(String JID)
+
++ Upon connecting to the stream host the target of the stream replys to the + initiator with the jabber id of the Socks5 host that they used. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Bytestream()+
+
+public Bytestream(String SID)+
+
SID
- The session ID related to the negotiation.setSessionID(String)
+Method Detail | +
---|
+public void setSessionID(String sessionID)+
+
sessionID
- +public String getSessionID()+
+
setSessionID(String)
+public void setMode(Bytestream.Mode mode)+
+
mode
- Bytestream.Mode
+public Bytestream.Mode getMode()+
+
setMode(Mode)
+public Bytestream.StreamHost addStreamHost(String JID, + String address)+
+
JID
- The jabber ID of the stream host.address
- The internet address of the stream host.
++public Bytestream.StreamHost addStreamHost(String JID, + String address, + int port)+
+
JID
- The jabber ID of the stream host.address
- The internet address of the stream host.port
- The port on which the remote host is seeking connections.
++public void addStreamHost(Bytestream.StreamHost host)+
+
host
- The potential stream host.+public Collection getStreamHosts()+
+
+public Bytestream.StreamHost getStreamHost(String JID)+
+
JID
- The jabber ID of the desired stream host.
++public int countStreamHosts()+
+
+public void setUsedHost(String JID)+
+
JID
- The jabber ID of the used host.+public Bytestream.StreamHostUsed getUsedHost()+
+
+public Bytestream.Activate getToActivate()+
+
+public void setToActivate(String targetID)+
+
targetID
- The jabber ID of the target of the file transfer.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DataForm.Item +
public static class DataForm.Item
+Represents items of reported data. +
+ +
+
+Constructor Summary | +|
---|---|
DataForm.Item(List fields)
+
++ |
+
+Method Summary | +|
---|---|
+ Iterator |
+getFields()
+
++ Returns the fields that define the data that goes with the item. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DataForm.Item(List fields)+
+Method Detail | +
---|
+public Iterator getFields()+
+
+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DataForm.ReportedData +
public static class DataForm.ReportedData
+Represents the fields that will be returned from a search. This information is useful when + you try to use the jabber:iq:search namespace to return dynamic form information. +
+ +
+
+Constructor Summary | +|
---|---|
DataForm.ReportedData(List fields)
+
++ |
+
+Method Summary | +|
---|---|
+ Iterator |
+getFields()
+
++ Returns the fields returned from a search. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DataForm.ReportedData(List fields)+
+Method Detail | +
---|
+public Iterator getFields()+
+
+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DataForm +
public class DataForm
+Represents a form that could be use for gathering data as well as for reporting data + returned from a search. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+DataForm.Item
+
++ Represents items of reported data. |
+
+static class |
+DataForm.ReportedData
+
++ Represents the fields that will be returned from a search. |
+
+Constructor Summary | +|
---|---|
DataForm(String type)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addField(FormField field)
+
++ Adds a new field as part of the form. |
+
+ void |
+addInstruction(String instruction)
+
++ Adds a new instruction to the list of instructions that explain how to fill out the form + and what the form is about. |
+
+ void |
+addItem(DataForm.Item item)
+
++ Adds a new item returned from a search. |
+
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ Iterator |
+getFields()
+
++ Returns an Iterator for the fields that are part of the form. |
+
+ Iterator |
+getInstructions()
+
++ Returns an Iterator for the list of instructions that explain how to fill out the form and + what the form is about. |
+
+ Iterator |
+getItems()
+
++ Returns an Iterator for the items returned from a search. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ DataForm.ReportedData |
+getReportedData()
+
++ Returns the fields that will be returned from a search. |
+
+ String |
+getTitle()
+
++ Returns the description of the data. |
+
+ String |
+getType()
+
++ Returns the meaning of the data within the context. |
+
+ void |
+setInstructions(List instructions)
+
++ Sets the list of instructions that explain how to fill out the form and what the form is + about. |
+
+ void |
+setReportedData(DataForm.ReportedData reportedData)
+
++ Sets the fields that will be returned from a search. |
+
+ void |
+setTitle(String title)
+
++ Sets the description of the data. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DataForm(String type)+
+Method Detail | +
---|
+public String getType()+
+ + Possible form types are: +
+
+public String getTitle()+
+
+public Iterator getInstructions()+
+
+public DataForm.ReportedData getReportedData()+
+
+public Iterator getItems()+
+
+public Iterator getFields()+
+
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public void setTitle(String title)+
+
title
- description of the data.+public void setInstructions(List instructions)+
+
instructions
- list of instructions that explain how to fill out the form.+public void setReportedData(DataForm.ReportedData reportedData)+
+
reportedData
- the fields that will be returned from a search.+public void addField(FormField field)+
+
field
- the field to add to the form.+public void addInstruction(String instruction)+
+
instruction
- the new instruction that explain how to fill out the form.+public void addItem(DataForm.Item item)+
+
item
- the item returned from a search.+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DefaultPrivateData +
public class DefaultPrivateData
+Default implementation of the PrivateData interface. Unless a PrivateDataProvider + is registered with the PrivateDataManager class, instances of this class will be + returned when getting private data.
+ + This class provides a very simple representation of an XML sub-document. Each element + is a key in a Map with its CDATA being the value. For example, given the following + XML sub-document: + +
+ <foo xmlns="http://bar.com"> + <color>blue</color> + <food>pizza</food> + </foo>+ + In this case, getValue("color") would return "blue", and getValue("food") would + return "pizza". This parsing mechanism mechanism is very simplistic and will not work + as desired in all cases (for example, if some of the elements have attributes. In those + cases, a custom
PrivateDataProvider
should be used.
++ +
+
+Constructor Summary | +|
---|---|
DefaultPrivateData(String elementName,
+ String namespace)
+
++ Creates a new generic private data object. |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the XML element name of the private data sub-packet root element. |
+
+ Iterator |
+getNames()
+
++ Returns an Iterator for the names that can be used to get + values of the private data. |
+
+ String |
+getNamespace()
+
++ Returns the XML namespace of the private data sub-packet root element. |
+
+ String |
+getValue(String name)
+
++ Returns a value given a name. |
+
+ void |
+setValue(String name,
+ String value)
+
++ Sets a value given the name. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PrivateData. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DefaultPrivateData(String elementName, + String namespace)+
+
elementName
- the name of the element of the XML sub-document.namespace
- the namespace of the element.+Method Detail | +
---|
+public String getElementName()+
+
getElementName
in interface PrivateData
+public String getNamespace()+
+
getNamespace
in interface PrivateData
+public String toXML()+
PrivateData
+
toXML
in interface PrivateData
+public Iterator getNames()+
+
+public String getValue(String name)+
+
name
- the name.
++public void setValue(String name, + String value)+
+
name
- the name.value
- the value.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DelayInformation +
public class DelayInformation
+Represents timestamp information about data stored for later delivery. A DelayInformation will + always includes the timestamp when the packet was originally sent and may include more + information such as the JID of the entity that originally sent the packet as well as the reason + for the dealy.
+ + For more information see JEP-91. +
+ +
+
+Field Summary | +|
---|---|
+static SimpleDateFormat |
+NEW_UTC_FORMAT
+
++ New date format based on JEP-82 that some clients may use when sending delayed dates. |
+
+static SimpleDateFormat |
+UTC_FORMAT
+
++ |
+
+Constructor Summary | +|
---|---|
DelayInformation(Date stamp)
+
++ Creates a new instance with the specified timestamp. |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getFrom()
+
++ Returns the JID of the entity that originally sent the packet or that delayed the + delivery of the packet or null if this information is not available. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+getReason()
+
++ Returns a natural-language description of the reason for the delay or null if + this information is not available. |
+
+ Date |
+getStamp()
+
++ Returns the timstamp when the packet was originally sent. |
+
+ void |
+setFrom(String from)
+
++ Sets the JID of the entity that originally sent the packet or that delayed the + delivery of the packet or null if this information is not available. |
+
+ void |
+setReason(String reason)
+
++ Sets a natural-language description of the reason for the delay or null if + this information is not available. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static SimpleDateFormat UTC_FORMAT+
+public static SimpleDateFormat NEW_UTC_FORMAT+
+
+Constructor Detail | +
---|
+public DelayInformation(Date stamp)+
+
+Method Detail | +
---|
+public String getFrom()+
+
+public void setFrom(String from)+
+
from
- the JID of the entity that originally sent the packet.+public Date getStamp()+
+
+public String getReason()+
+
+public void setReason(String reason)+
+
reason
- a natural-language description of the reason for the delay or null.+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DiscoverInfo.Feature +
public static class DiscoverInfo.Feature
+Represents the features offered by the item. This information helps requestors determine + what actions are possible with regard to this item (registration, search, join, etc.) + as well as specific feature types of interest, if any (e.g., for the purpose of feature + negotiation). +
+ +
+
+Constructor Summary | +|
---|---|
DiscoverInfo.Feature(String variable)
+
++ Creates a new feature offered by an XMPP entity or item. |
+
+Method Summary | +|
---|---|
+ String |
+getVar()
+
++ Returns the feature's variable. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DiscoverInfo.Feature(String variable)+
+
variable
- the feature's variable.+Method Detail | +
---|
+public String getVar()+
+
+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DiscoverInfo.Identity +
public static class DiscoverInfo.Identity
+Represents the identity of a given XMPP entity. An entity may have many identities but all + the identities SHOULD have the same name.
+ + Refer to Jabber::Registrar + in order to get the official registry of values for the category and type + attributes. +
+ +
+
+Constructor Summary | +|
---|---|
DiscoverInfo.Identity(String category,
+ String name)
+
++ Creates a new identity for an XMPP entity. |
+
+Method Summary | +|
---|---|
+ String |
+getCategory()
+
++ Returns the entity's category. |
+
+ String |
+getName()
+
++ Returns the identity's name. |
+
+ String |
+getType()
+
++ Returns the entity's type. |
+
+ void |
+setType(String type)
+
++ Sets the entity's type. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DiscoverInfo.Identity(String category, + String name)+
+
category
- the entity's category.name
- the entity's name.+Method Detail | +
---|
+public String getCategory()+
+
+public String getName()+
+
+public String getType()+
+
+public void setType(String type)+
+
type
- the identity's type.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.DiscoverInfo +
public class DiscoverInfo
+A DiscoverInfo IQ packet, which is used by XMPP clients to request and receive information + to/from other XMPP entities.
+ + The received information may contain one or more identities of the requested XMPP entity, and + a list of supported features by the requested XMPP entity. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+DiscoverInfo.Feature
+
++ Represents the features offered by the item. |
+
+static class |
+DiscoverInfo.Identity
+
++ Represents the identity of a given XMPP entity. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
DiscoverInfo()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addFeature(String feature)
+
++ Adds a new feature to the discovered information. |
+
+ void |
+addIdentity(DiscoverInfo.Identity identity)
+
++ Adds a new identity of the requested entity to the discovered information. |
+
+ boolean |
+containsFeature(String feature)
+
++ Returns true if the specified feature is part of the discovered information. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ Iterator |
+getIdentities()
+
++ Returns the discovered identities of an XMPP entity. |
+
+ String |
+getNode()
+
++ Returns the node attribute that supplements the 'jid' attribute. |
+
+ void |
+setNode(String node)
+
++ Sets the node attribute that supplements the 'jid' attribute. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DiscoverInfo()+
+Method Detail | +
---|
+public void addFeature(String feature)+
+
feature
- the discovered feature+public void addIdentity(DiscoverInfo.Identity identity)+
+
identity
- the discovered entity's identity+public Iterator getIdentities()+
+
+public String getNode()+
+ + Node attributes SHOULD be used only when trying to provide or query information which + is not directly addressable. +
+
+public void setNode(String node)+
+ + Node attributes SHOULD be used only when trying to provide or query information which + is not directly addressable. +
+
node
- the node attribute that supplements the 'jid' attribute+public boolean containsFeature(String feature)+
+
feature
- the feature to check
++public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.DiscoverItems.Item +
public static class DiscoverItems.Item
+An item is associated with an XMPP Entity, usually thought of a children of the parent + entity and normally are addressable as a JID.
+ + An item associated with an entity may not be addressable as a JID. In order to handle + such items, Service Discovery uses an optional 'node' attribute that supplements the + 'jid' attribute. +
+ +
+
+Field Summary | +|
---|---|
+static String |
+REMOVE_ACTION
+
++ Request to remove the item. |
+
+static String |
+UPDATE_ACTION
+
++ Request to create or update the item. |
+
+Constructor Summary | +|
---|---|
DiscoverItems.Item(String entityID)
+
++ Create a new Item associated with a given entity. |
+
+Method Summary | +|
---|---|
+ String |
+getAction()
+
++ Returns the action that specifies the action being taken for this item. |
+
+ String |
+getEntityID()
+
++ Returns the entity's ID. |
+
+ String |
+getName()
+
++ Returns the entity's name. |
+
+ String |
+getNode()
+
++ Returns the node attribute that supplements the 'jid' attribute. |
+
+ void |
+setAction(String action)
+
++ Sets the action that specifies the action being taken for this item. |
+
+ void |
+setName(String name)
+
++ Sets the entity's name. |
+
+ void |
+setNode(String node)
+
++ Sets the node attribute that supplements the 'jid' attribute. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String UPDATE_ACTION+
+
+public static final String REMOVE_ACTION+
+
+Constructor Detail | +
---|
+public DiscoverItems.Item(String entityID)+
+
entityID
- the id of the entity that contains the item+Method Detail | +
---|
+public String getEntityID()+
+
+public String getName()+
+
+public void setName(String name)+
+
name
- the entity's name.+public String getNode()+
+ + Node attributes SHOULD be used only when trying to provide or query information which + is not directly addressable. +
+
+public void setNode(String node)+
+ + Node attributes SHOULD be used only when trying to provide or query information which + is not directly addressable. +
+
node
- the node attribute that supplements the 'jid' attribute+public String getAction()+
+
+public void setAction(String action)+
+
action
- the action being taken for this item+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.DiscoverItems +
public class DiscoverItems
+A DiscoverItems IQ packet, which is used by XMPP clients to request and receive items + associated with XMPP entities.
+ + The items could also be queried in order to discover if they contain items inside. Some items + may be addressable by its JID and others may require to be addressed by a JID and a node name. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+DiscoverItems.Item
+
++ An item is associated with an XMPP Entity, usually thought of a children of the parent + entity and normally are addressable as a JID. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
DiscoverItems()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addItem(DiscoverItems.Item item)
+
++ Adds a new item to the discovered information. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ Iterator |
+getItems()
+
++ Returns the discovered items of the queried XMPP entity. |
+
+ String |
+getNode()
+
++ Returns the node attribute that supplements the 'jid' attribute. |
+
+ void |
+setNode(String node)
+
++ Sets the node attribute that supplements the 'jid' attribute. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DiscoverItems()+
+Method Detail | +
---|
+public void addItem(DiscoverItems.Item item)+
+
item
- the discovered entity's item+public Iterator getItems()+
+
+public String getNode()+
+ + Node attributes SHOULD be used only when trying to provide or query information which + is not directly addressable. +
+
+public void setNode(String node)+
+ + Node attributes SHOULD be used only when trying to provide or query information which + is not directly addressable. +
+
node
- the node attribute that supplements the 'jid' attribute+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.IBBExtensions.Close +
public static class IBBExtensions.Close
+Represents the closing of the file transfer. +
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +|
---|---|
+static String |
+ELEMENT_NAME
+
++ |
+
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
IBBExtensions.Close(String sid)
+
++ The constructor. |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getElementName()
+
++ |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String ELEMENT_NAME+
+Constructor Detail | +
---|
+public IBBExtensions.Close(String sid)+
+
sid
- The unique stream ID identifying this file transfer.+Method Detail | +
---|
+public String getElementName()+
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.IBBExtensions.Data +
public static class IBBExtensions.Data
+A data packet containing a portion of the file being sent encoded in + base64. +
+ +
+
+Field Summary | +|
---|---|
+static String |
+ELEMENT_NAME
+
++ |
+
+Constructor Summary | +|
---|---|
IBBExtensions.Data(String sid)
+
++ A constructor. |
+|
IBBExtensions.Data(String sid,
+ long seq,
+ String data)
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getData()
+
++ Returns the data contained in this packet. |
+
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ long |
+getSeq()
+
++ Returns the sequence of this packet in regard to the other data + packets. |
+
+ String |
+getSessionID()
+
++ Returns the unique stream ID identifying this file transfer. |
+
+ void |
+setData(String data)
+
++ Sets the data contained in this packet. |
+
+ void |
+setSeq(long seq)
+
++ Sets the sequence of this packet. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String ELEMENT_NAME+
+Constructor Detail | +
---|
+public IBBExtensions.Data(String sid)+
+
sid
- The stream ID.+public IBBExtensions.Data(String sid, + long seq, + String data)+
+Method Detail | +
---|
+public String getSessionID()+
+
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getData()+
+
+public void setData(String data)+
+
data
- The data encoded in base65+public long getSeq()+
+
+public void setSeq(long seq)+
+
seq
- A number between 0 and 65535+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.IBBExtensions.Open +
public static class IBBExtensions.Open
+Represents a request to open the file transfer. +
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +|
---|---|
+static String |
+ELEMENT_NAME
+
++ |
+
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
IBBExtensions.Open(String sid,
+ int blockSize)
+
++ Constructs an open packet. |
+
+Method Summary | +|
---|---|
+ int |
+getBlockSize()
+
++ The size blocks in which the data will be sent. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getElementName()
+
++ |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String ELEMENT_NAME+
+Constructor Detail | +
---|
+public IBBExtensions.Open(String sid, + int blockSize)+
+
sid
- The streamID of the file transfer.blockSize
- The block size of the file transfer.+Method Detail | +
---|
+public int getBlockSize()+
+
+public String getElementName()+
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.IBBExtensions +
public class IBBExtensions
+The different extensions used throughtout the negotiation and transfer + process. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+IBBExtensions.Close
+
++ Represents the closing of the file transfer. |
+
+static class |
+IBBExtensions.Data
+
++ A data packet containing a portion of the file being sent encoded in + base64. |
+
+static class |
+IBBExtensions.Open
+
++ Represents a request to open the file transfer. |
+
+Field Summary | +|
---|---|
+static String |
+NAMESPACE
+
++ |
+
+Constructor Summary | +|
---|---|
IBBExtensions()
+
++ |
+
+Method Summary | +
---|
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String NAMESPACE+
+Constructor Detail | +
---|
+public IBBExtensions()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.LastActivity.Provider +
public static class LastActivity.Provider
+The IQ Provider for LastActivity. +
+ +
+
+Constructor Summary | +|
---|---|
LastActivity.Provider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public LastActivity.Provider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.LastActivity +
public class LastActivity
+A last activity IQ for retrieving information about the last activity associated with a Jabber ID. + LastActivity (JEP-012) allows for retrieval of how long a particular user has been idle and the + message the specified when doing so. + To get the last activity of a user, simple send the LastActivity packet to them, as in the + following code example: +
++ XMPPConnection con = new XMPPConnection("jabber.org"); + con.login("john", "doe"); + LastActivity activity = LastActivity.getLastActivity(con, "xray@jabber.org"); ++
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+LastActivity.Provider
+
++ The IQ Provider for LastActivity. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +|
---|---|
+ long |
+lastActivity
+
++ |
+
+ String |
+message
+
++ |
+
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
LastActivity()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ long |
+getIdleTime()
+
++ Returns number of seconds that have passed since the user last logged out. |
+
+static LastActivity |
+getLastActivity(XMPPConnection con,
+ String jid)
+
++ Retrieve the last activity of a particular jid. |
+
+ String |
+getStatusMessage()
+
++ Returns the status message of the last unavailable presence received from the user. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public long lastActivity+
+public String message+
+Constructor Detail | +
---|
+public LastActivity()+
+Method Detail | +
---|
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+public long getIdleTime()+
+
+public String getStatusMessage()+
+
+public static LastActivity getLastActivity(XMPPConnection con, + String jid) + throws XMPPException+
+
con
- the current XMPPConnection.jid
- the JID of the user.
+XMPPException
- thrown if a server error has occured.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCAdmin.Item +
public static class MUCAdmin.Item
+Item child that holds information about roles, affiliation, jids and nicks. +
+ +
+
+Constructor Summary | +|
---|---|
MUCAdmin.Item(String affiliation,
+ String role)
+
++ Creates a new item child. |
+
+Method Summary | +|
---|---|
+ String |
+getActor()
+
++ Returns the actor (JID of an occupant in the room) that was kicked or banned. |
+
+ String |
+getAffiliation()
+
++ Returns the occupant's affiliation to the room. |
+
+ String |
+getJid()
+
++ Returns the |
+
+ String |
+getNick()
+
++ Returns the new nickname of an occupant that is changing his/her nickname. |
+
+ String |
+getReason()
+
++ Returns the reason for the item child. |
+
+ String |
+getRole()
+
++ Returns the temporary position or privilege level of an occupant within a room. |
+
+ void |
+setActor(String actor)
+
++ Sets the actor (JID of an occupant in the room) that was kicked or banned. |
+
+ void |
+setJid(String jid)
+
++ Sets the |
+
+ void |
+setNick(String nick)
+
++ Sets the new nickname of an occupant that is changing his/her nickname. |
+
+ void |
+setReason(String reason)
+
++ Sets the reason for the item child. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCAdmin.Item(String affiliation, + String role)+
+
affiliation
- the actor's affiliation to the roomrole
- the privilege level of an occupant within a room.+Method Detail | +
---|
+public String getActor()+
+
+public String getReason()+
+
+public String getAffiliation()+
+
+public String getJid()+
+
+public String getNick()+
+
+public String getRole()+
+
+public void setActor(String actor)+
+
actor
- the actor (JID of an occupant in the room) that was kicked or banned.+public void setReason(String reason)+
+
reason
- the reason why a user (occupant) was kicked or banned.+public void setJid(String jid)+
+
jid
- the JID by which an occupant is identified within a room.+public void setNick(String nick)+
+
nick
- the new nickname of an occupant that is changing his/her nickname.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.MUCAdmin +
public class MUCAdmin
+IQ packet that serves for kicking users, granting and revoking voice, banning users, + modifying the ban list, granting and revoking membership and granting and revoking + moderator privileges. All these operations are scoped by the + 'http://jabber.org/protocol/muc#admin' namespace. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+MUCAdmin.Item
+
++ Item child that holds information about roles, affiliation, jids and nicks. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
MUCAdmin()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addItem(MUCAdmin.Item item)
+
++ Adds an item child that holds information about roles, affiliation, jids and nicks. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ Iterator |
+getItems()
+
++ Returns an Iterator for item childs that holds information about roles, affiliation, + jids and nicks. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCAdmin()+
+Method Detail | +
---|
+public Iterator getItems()+
+
+public void addItem(MUCAdmin.Item item)+
+
item
- the item child that holds information about roles, affiliation, jids and nicks.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCInitialPresence.History +
public static class MUCInitialPresence.History
+The History class controls the number of characters or messages to receive + when entering a room. +
+ +
+
+Constructor Summary | +|
---|---|
MUCInitialPresence.History()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+getMaxChars()
+
++ Returns the total number of characters to receive in the history. |
+
+ int |
+getMaxStanzas()
+
++ Returns the total number of messages to receive in the history. |
+
+ int |
+getSeconds()
+
++ Returns the number of seconds to use to filter the messages received during that time. |
+
+ Date |
+getSince()
+
++ Returns the since date to use to filter the messages received during that time. |
+
+ void |
+setMaxChars(int maxChars)
+
++ Sets the total number of characters to receive in the history. |
+
+ void |
+setMaxStanzas(int maxStanzas)
+
++ Sets the total number of messages to receive in the history. |
+
+ void |
+setSeconds(int seconds)
+
++ Sets the number of seconds to use to filter the messages received during that time. |
+
+ void |
+setSince(Date since)
+
++ Sets the since date to use to filter the messages received during that time. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCInitialPresence.History()+
+Method Detail | +
---|
+public int getMaxChars()+
+
+public int getMaxStanzas()+
+
+public int getSeconds()+
+
+public Date getSince()+
+
+public void setMaxChars(int maxChars)+
+
maxChars
- the total number of characters to receive in the history.+public void setMaxStanzas(int maxStanzas)+
+
maxStanzas
- the total number of messages to receive in the history.+public void setSeconds(int seconds)+
+
seconds
- the number of seconds to use to filter the messages received during
+ that time.+public void setSince(Date since)+
+
since
- the since date to use to filter the messages received during that time.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCInitialPresence +
public class MUCInitialPresence
+Represents extended presence information whose sole purpose is to signal the ability of + the occupant to speak the MUC protocol when joining a room. If the room requires a password + then the MUCInitialPresence should include one.
+ + The amount of discussion history provided on entering a room (perhaps because the + user is on a low-bandwidth connection or is using a small-footprint client) could be managed by + setting a configured History instance to the MUCInitialPresence instance. +
+ +
+
setHistory(MUCInitialPresence.History).
+Nested Class Summary | +|
---|---|
+static class |
+MUCInitialPresence.History
+
++ The History class controls the number of characters or messages to receive + when entering a room. |
+
+Constructor Summary | +|
---|---|
MUCInitialPresence()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ MUCInitialPresence.History |
+getHistory()
+
++ Returns the history that manages the amount of discussion history provided on + entering a room. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+getPassword()
+
++ Returns the password to use when the room requires a password. |
+
+ void |
+setHistory(MUCInitialPresence.History history)
+
++ Sets the History that manages the amount of discussion history provided on + entering a room. |
+
+ void |
+setPassword(String password)
+
++ Sets the password to use when the room requires a password. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCInitialPresence()+
+Method Detail | +
---|
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+public MUCInitialPresence.History getHistory()+
+
+public String getPassword()+
+
+public void setHistory(MUCInitialPresence.History history)+
+
history
- that manages the amount of discussion history provided on
+ entering a room.+public void setPassword(String password)+
+
password
- the password to use when the room requires a password.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCOwner.Destroy +
public static class MUCOwner.Destroy
+Represents a request to the server to destroy a room. The sender of the request + should be the room's owner. If the sender of the destroy request is not the room's owner + then the server will answer a "Forbidden" error. +
+ +
+
+Constructor Summary | +|
---|---|
MUCOwner.Destroy()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getJid()
+
++ Returns the JID of an alternate location since the current room is being destroyed. |
+
+ String |
+getReason()
+
++ Returns the reason for the room destruction. |
+
+ void |
+setJid(String jid)
+
++ Sets the JID of an alternate location since the current room is being destroyed. |
+
+ void |
+setReason(String reason)
+
++ Sets the reason for the room destruction. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCOwner.Destroy()+
+Method Detail | +
---|
+public String getJid()+
+
+public String getReason()+
+
+public void setJid(String jid)+
+
jid
- the JID of an alternate location.+public void setReason(String reason)+
+
reason
- the reason for the room destruction.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCOwner.Item +
public static class MUCOwner.Item
+Item child that holds information about affiliation, jids and nicks. +
+ +
+
+Constructor Summary | +|
---|---|
MUCOwner.Item(String affiliation)
+
++ Creates a new item child. |
+
+Method Summary | +|
---|---|
+ String |
+getActor()
+
++ Returns the actor (JID of an occupant in the room) that was kicked or banned. |
+
+ String |
+getAffiliation()
+
++ Returns the occupant's affiliation to the room. |
+
+ String |
+getJid()
+
++ Returns the |
+
+ String |
+getNick()
+
++ Returns the new nickname of an occupant that is changing his/her nickname. |
+
+ String |
+getReason()
+
++ Returns the reason for the item child. |
+
+ String |
+getRole()
+
++ Returns the temporary position or privilege level of an occupant within a room. |
+
+ void |
+setActor(String actor)
+
++ Sets the actor (JID of an occupant in the room) that was kicked or banned. |
+
+ void |
+setJid(String jid)
+
++ Sets the |
+
+ void |
+setNick(String nick)
+
++ Sets the new nickname of an occupant that is changing his/her nickname. |
+
+ void |
+setReason(String reason)
+
++ Sets the reason for the item child. |
+
+ void |
+setRole(String role)
+
++ Sets the temporary position or privilege level of an occupant within a room. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCOwner.Item(String affiliation)+
+
affiliation
- the actor's affiliation to the room+Method Detail | +
---|
+public String getActor()+
+
+public String getReason()+
+
+public String getAffiliation()+
+
+public String getJid()+
+
+public String getNick()+
+
+public String getRole()+
+
+public void setActor(String actor)+
+
actor
- the actor (JID of an occupant in the room) that was kicked or banned.+public void setReason(String reason)+
+
reason
- the reason why a user (occupant) was kicked or banned.+public void setJid(String jid)+
+
jid
- the JID by which an occupant is identified within a room.+public void setNick(String nick)+
+
nick
- the new nickname of an occupant that is changing his/her nickname.+public void setRole(String role)+
+
role
- the new privilege level of an occupant within a room.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.MUCOwner +
public class MUCOwner
+IQ packet that serves for granting and revoking ownership privileges, granting + and revoking administrative privileges and destroying a room. All these operations + are scoped by the 'http://jabber.org/protocol/muc#owner' namespace. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+MUCOwner.Destroy
+
++ Represents a request to the server to destroy a room. |
+
+static class |
+MUCOwner.Item
+
++ Item child that holds information about affiliation, jids and nicks. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
MUCOwner()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addItem(MUCOwner.Item item)
+
++ Adds an item child that holds information about affiliation, jids and nicks. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ MUCOwner.Destroy |
+getDestroy()
+
++ Returns a request to the server to destroy a room. |
+
+ Iterator |
+getItems()
+
++ Returns an Iterator for item childs that holds information about affiliation, + jids and nicks. |
+
+ void |
+setDestroy(MUCOwner.Destroy destroy)
+
++ Sets a request to the server to destroy a room. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCOwner()+
+Method Detail | +
---|
+public Iterator getItems()+
+
+public MUCOwner.Destroy getDestroy()+
+
+public void setDestroy(MUCOwner.Destroy destroy)+
+
destroy
- the request to the server to destroy a room.+public void addItem(MUCOwner.Item item)+
+
item
- the item child that holds information about affiliation, jids and nicks.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCUser.Decline +
public static class MUCUser.Decline
+Represents a rejection to an invitation from another user to a room. The rejection will be + sent to the room which in turn will forward the refusal to the inviter. +
+ +
+
+Constructor Summary | +|
---|---|
MUCUser.Decline()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getFrom()
+
++ Returns the bare JID of the invitee that rejected the invitation. |
+
+ String |
+getReason()
+
++ Returns the message explaining why the invitation was rejected. |
+
+ String |
+getTo()
+
++ Returns the bare JID of the inviter. |
+
+ void |
+setFrom(String from)
+
++ Sets the bare JID of the invitee that rejected the invitation. |
+
+ void |
+setReason(String reason)
+
++ Sets the message explaining why the invitation was rejected. |
+
+ void |
+setTo(String to)
+
++ Sets the bare JID of the inviter. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCUser.Decline()+
+Method Detail | +
---|
+public String getFrom()+
+
+public String getReason()+
+
+public String getTo()+
+
+public void setFrom(String from)+
+
from
- the bare JID of the invitee that rejected the invitation.+public void setReason(String reason)+
+
reason
- the message explaining the reason for the rejection.+public void setTo(String to)+
+
to
- the bare JID of the inviter.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCUser.Destroy +
public static class MUCUser.Destroy
+Represents a notification that the room has been destroyed. After a room has been destroyed, + the room occupants will receive a Presence packet of type 'unavailable' with the reason for + the room destruction if provided by the room owner. +
+ +
+
+Constructor Summary | +|
---|---|
MUCUser.Destroy()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getJid()
+
++ Returns the JID of an alternate location since the current room is being destroyed. |
+
+ String |
+getReason()
+
++ Returns the reason for the room destruction. |
+
+ void |
+setJid(String jid)
+
++ Sets the JID of an alternate location since the current room is being destroyed. |
+
+ void |
+setReason(String reason)
+
++ Sets the reason for the room destruction. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCUser.Destroy()+
+Method Detail | +
---|
+public String getJid()+
+
+public String getReason()+
+
+public void setJid(String jid)+
+
jid
- the JID of an alternate location.+public void setReason(String reason)+
+
reason
- the reason for the room destruction.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCUser.Invite +
public static class MUCUser.Invite
+Represents an invitation for another user to a room. The sender of the invitation + must be an occupant of the room. The invitation will be sent to the room which in turn + will forward the invitation to the invitee. +
+ +
+
+Constructor Summary | +|
---|---|
MUCUser.Invite()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getFrom()
+
++ Returns the bare JID of the inviter or, optionally, the room JID. |
+
+ String |
+getReason()
+
++ Returns the message explaining the invitation. |
+
+ String |
+getTo()
+
++ Returns the bare JID of the invitee. |
+
+ void |
+setFrom(String from)
+
++ Sets the bare JID of the inviter or, optionally, the room JID. |
+
+ void |
+setReason(String reason)
+
++ Sets the message explaining the invitation. |
+
+ void |
+setTo(String to)
+
++ Sets the bare JID of the invitee. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCUser.Invite()+
+Method Detail | +
---|
+public String getFrom()+
+
+public String getReason()+
+
+public String getTo()+
+
+public void setFrom(String from)+
+
from
- the bare JID of the inviter or, optionally, the room JID.+public void setReason(String reason)+
+
reason
- the message explaining the invitation.+public void setTo(String to)+
+
to
- the bare JID of the invitee.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCUser.Item +
public static class MUCUser.Item
+Item child that holds information about roles, affiliation, jids and nicks. +
+ +
+
+Constructor Summary | +|
---|---|
MUCUser.Item(String affiliation,
+ String role)
+
++ Creates a new item child. |
+
+Method Summary | +|
---|---|
+ String |
+getActor()
+
++ Returns the actor (JID of an occupant in the room) that was kicked or banned. |
+
+ String |
+getAffiliation()
+
++ Returns the occupant's affiliation to the room. |
+
+ String |
+getJid()
+
++ Returns the |
+
+ String |
+getNick()
+
++ Returns the new nickname of an occupant that is changing his/her nickname. |
+
+ String |
+getReason()
+
++ Returns the reason for the item child. |
+
+ String |
+getRole()
+
++ Returns the temporary position or privilege level of an occupant within a room. |
+
+ void |
+setActor(String actor)
+
++ Sets the actor (JID of an occupant in the room) that was kicked or banned. |
+
+ void |
+setJid(String jid)
+
++ Sets the |
+
+ void |
+setNick(String nick)
+
++ Sets the new nickname of an occupant that is changing his/her nickname. |
+
+ void |
+setReason(String reason)
+
++ Sets the reason for the item child. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCUser.Item(String affiliation, + String role)+
+
affiliation
- the actor's affiliation to the roomrole
- the privilege level of an occupant within a room.+Method Detail | +
---|
+public String getActor()+
+
+public String getReason()+
+
+public String getAffiliation()+
+
+public String getJid()+
+
+public String getNick()+
+
+public String getRole()+
+
+public void setActor(String actor)+
+
actor
- the actor (JID of an occupant in the room) that was kicked or banned.+public void setReason(String reason)+
+
reason
- the reason why a user (occupant) was kicked or banned.+public void setJid(String jid)+
+
jid
- the JID by which an occupant is identified within a room.+public void setNick(String nick)+
+
nick
- the new nickname of an occupant that is changing his/her nickname.+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCUser.Status +
public static class MUCUser.Status
+Status code assists in presenting notification messages. The following link provides the + list of existing error codes (@link http://www.jabber.org/jeps/jep-0045.html#errorstatus). +
+ +
+
+Constructor Summary | +|
---|---|
MUCUser.Status(String code)
+
++ Creates a new instance of Status with the specified code. |
+
+Method Summary | +|
---|---|
+ String |
+getCode()
+
++ Returns the code that uniquely identifies the reason of the error. |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCUser.Status(String code)+
+
code
- the code that uniquely identifies the reason of the error.+Method Detail | +
---|
+public String getCode()+
+
+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MUCUser +
public class MUCUser
+Represents extended presence information about roles, affiliations, full JIDs, + or status codes scoped by the 'http://jabber.org/protocol/muc#user' namespace. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+MUCUser.Decline
+
++ Represents a rejection to an invitation from another user to a room. |
+
+static class |
+MUCUser.Destroy
+
++ Represents a notification that the room has been destroyed. |
+
+static class |
+MUCUser.Invite
+
++ Represents an invitation for another user to a room. |
+
+static class |
+MUCUser.Item
+
++ Item child that holds information about roles, affiliation, jids and nicks. |
+
+static class |
+MUCUser.Status
+
++ Status code assists in presenting notification messages. |
+
+Constructor Summary | +|
---|---|
MUCUser()
+
++ |
+
+Method Summary | +|
---|---|
+ MUCUser.Decline |
+getDecline()
+
++ Returns the rejection to an invitation from another user to a room. |
+
+ MUCUser.Destroy |
+getDestroy()
+
++ Returns the notification that the room has been destroyed. |
+
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ MUCUser.Invite |
+getInvite()
+
++ Returns the invitation for another user to a room. |
+
+ MUCUser.Item |
+getItem()
+
++ Returns the item child that holds information about roles, affiliation, jids and nicks. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+getPassword()
+
++ Returns the password to use to enter Password-Protected Room. |
+
+ MUCUser.Status |
+getStatus()
+
++ Returns the status which holds a code that assists in presenting notification messages. |
+
+ void |
+setDecline(MUCUser.Decline decline)
+
++ Sets the rejection to an invitation from another user to a room. |
+
+ void |
+setDestroy(MUCUser.Destroy destroy)
+
++ Sets the notification that the room has been destroyed. |
+
+ void |
+setInvite(MUCUser.Invite invite)
+
++ Sets the invitation for another user to a room. |
+
+ void |
+setItem(MUCUser.Item item)
+
++ Sets the item child that holds information about roles, affiliation, jids and nicks. |
+
+ void |
+setPassword(String string)
+
++ Sets the password to use to enter Password-Protected Room. |
+
+ void |
+setStatus(MUCUser.Status status)
+
++ Sets the status which holds a code that assists in presenting notification messages. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCUser()+
+Method Detail | +
---|
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+public MUCUser.Invite getInvite()+
+
+public MUCUser.Decline getDecline()+
+
+public MUCUser.Item getItem()+
+
+public String getPassword()+
+
+public MUCUser.Status getStatus()+
+
+public MUCUser.Destroy getDestroy()+
+
+public void setInvite(MUCUser.Invite invite)+
+
invite
- the invitation for another user to a room.+public void setDecline(MUCUser.Decline decline)+
+
decline
- the rejection to an invitation from another user to a room.+public void setItem(MUCUser.Item item)+
+
item
- the item child that holds information about roles, affiliation, jids and nicks.+public void setPassword(String string)+
+
string
- the password to use to enter Password-Protected Room.+public void setStatus(MUCUser.Status status)+
+
status
- the status which holds a code that assists in presenting notification
+ messages.+public void setDestroy(MUCUser.Destroy destroy)+
+
destroy
- the notification that the room has been destroyed.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MessageEvent +
public class MessageEvent
+Represents message events relating to the delivery, display, composition and cancellation of + messages.
+ + There are four message events currently defined in this namespace: +
+ +
+
+Field Summary | +|
---|---|
+static String |
+CANCELLED
+
++ |
+
+static String |
+COMPOSING
+
++ |
+
+static String |
+DELIVERED
+
++ |
+
+static String |
+DISPLAYED
+
++ |
+
+static String |
+OFFLINE
+
++ |
+
+Constructor Summary | +|
---|---|
MessageEvent()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the XML element name of the extension sub-packet root element. |
+
+ Iterator |
+getEventTypes()
+
++ Returns the types of events. |
+
+ String |
+getNamespace()
+
++ Returns the XML namespace of the extension sub-packet root element. |
+
+ String |
+getPacketID()
+
++ Returns the unique ID of the message that requested to be notified of the event. |
+
+ boolean |
+isCancelled()
+
++ When the message is a notification returns if the receiver of the message cancelled + composing a reply. |
+
+ boolean |
+isComposing()
+
++ When the message is a request returns if the sender of the message requests to be notified + when the receiver is composing a reply. |
+
+ boolean |
+isDelivered()
+
++ When the message is a request returns if the sender of the message requests to be notified + when the message is delivered. |
+
+ boolean |
+isDisplayed()
+
++ When the message is a request returns if the sender of the message requests to be notified + when the message is displayed. |
+
+ boolean |
+isMessageEventRequest()
+
++ Returns true if this MessageEvent is a request for notifications. |
+
+ boolean |
+isOffline()
+
++ When the message is a request returns if the sender of the message requests to be notified + when the receiver of the message is offline. |
+
+ void |
+setCancelled(boolean cancelled)
+
++ When the message is a notification sets if the receiver of the message cancelled + composing a reply. |
+
+ void |
+setComposing(boolean composing)
+
++ When the message is a request sets if the sender of the message requests to be notified + when the receiver is composing a reply. |
+
+ void |
+setDelivered(boolean delivered)
+
++ When the message is a request sets if the sender of the message requests to be notified + when the message is delivered. |
+
+ void |
+setDisplayed(boolean displayed)
+
++ When the message is a request sets if the sender of the message requests to be notified + when the message is displayed. |
+
+ void |
+setOffline(boolean offline)
+
++ When the message is a request sets if the sender of the message requests to be notified + when the receiver of the message is offline. |
+
+ void |
+setPacketID(String packetID)
+
++ Sets the unique ID of the message that requested to be notified of the event. |
+
+ String |
+toXML()
+
++ Returns the XML representation of a Message Event according the specification. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String OFFLINE+
+public static final String COMPOSING+
+public static final String DISPLAYED+
+public static final String DELIVERED+
+public static final String CANCELLED+
+Constructor Detail | +
---|
+public MessageEvent()+
+Method Detail | +
---|
+public String getElementName()+
+
getElementName
in interface PacketExtension
+public String getNamespace()+
+
getNamespace
in interface PacketExtension
+public boolean isComposing()+
+
+public boolean isDelivered()+
+
+public boolean isDisplayed()+
+
+public boolean isOffline()+
+
+public boolean isCancelled()+
+
+public String getPacketID()+
+
+public Iterator getEventTypes()+
+
+public void setComposing(boolean composing)+
+
composing
- sets if the sender is requesting to be notified when composing or when
+ notifying that the receiver of the message is composing a reply+public void setDelivered(boolean delivered)+
+
delivered
- sets if the sender is requesting to be notified when delivered or when
+ notifying that the message was delivered+public void setDisplayed(boolean displayed)+
+
displayed
- sets if the sender is requesting to be notified when displayed or when
+ notifying that the message was displayed+public void setOffline(boolean offline)+
+
offline
- sets if the sender is requesting to be notified when offline or when
+ notifying that the receiver of the message is offline+public void setCancelled(boolean cancelled)+
+
cancelled
- sets if the receiver of the message cancelled composing a reply+public void setPacketID(String packetID)+
+
packetID
- the message id that requested to be notified of the event.+public boolean isMessageEventRequest()+
+
+public String toXML()+
+ + Request to be notified when displayed: +
+ <message + to='romeo@montague.net/orchard' + from='juliet@capulet.com/balcony' + id='message22'> + <x xmlns='jabber:x:event'> + <displayed/> + </x> + </message> ++ + Notification of displayed: +
+ <message + from='romeo@montague.net/orchard' + to='juliet@capulet.com/balcony'> + <x xmlns='jabber:x:event'> + <displayed/> + <id>message22</id> + </x> + </message> ++
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MultipleAddresses.Address +
public static class MultipleAddresses.Address
+
+Method Summary | +|
---|---|
+ String |
+getDescription()
+
++ |
+
+ String |
+getJid()
+
++ |
+
+ String |
+getNode()
+
++ |
+
+ String |
+getType()
+
++ |
+
+ String |
+getUri()
+
++ |
+
+ boolean |
+isDelivered()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Method Detail | +
---|
+public String getType()+
+public String getJid()+
+public String getNode()+
+public String getDescription()+
+public boolean isDelivered()+
+public String getUri()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.MultipleAddresses +
public class MultipleAddresses
+Packet extension that contains the list of addresses that a packet should be sent or was sent. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+MultipleAddresses.Address
+
++ |
+
+Field Summary | +|
---|---|
+static String |
+BCC
+
++ |
+
+static String |
+CC
+
++ |
+
+static String |
+NO_REPLY
+
++ |
+
+static String |
+REPLY_ROOM
+
++ |
+
+static String |
+REPLY_TO
+
++ |
+
+static String |
+TO
+
++ |
+
+Constructor Summary | +|
---|---|
MultipleAddresses()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addAddress(String type,
+ String jid,
+ String node,
+ String desc,
+ boolean delivered,
+ String uri)
+
++ Adds a new address to which the packet is going to be sent or was sent. |
+
+ List |
+getAddressesOfType(String type)
+
++ Returns the list of addresses that matches the specified type. |
+
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ void |
+setNoReply()
+
++ Indicate that the packet being sent should not be replied. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final String BCC+
+public static final String CC+
+public static final String NO_REPLY+
+public static final String REPLY_ROOM+
+public static final String REPLY_TO+
+public static final String TO+
+Constructor Detail | +
---|
+public MultipleAddresses()+
+Method Detail | +
---|
+public void addAddress(String type, + String jid, + String node, + String desc, + boolean delivered, + String uri)+
+
type
- on of the static type (BCC, CC, NO_REPLY, REPLY_ROOM, etc.)jid
- the JID address of the recipient.node
- used to specify a sub-addressable unit at a particular JID, corresponding to
+ a Service Discovery node.desc
- used to specify human-readable information for this address.delivered
- true when the packet was already delivered to this address.uri
- used to specify an external system address, such as a sip:, sips:, or im: URI.+public void setNoReply()+
+
+public List getAddressesOfType(String type)+
+
type
- Examples of address type are: TO, CC, BCC, etc.
++public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.OfflineMessageInfo.Provider +
public static class OfflineMessageInfo.Provider
+
+Constructor Summary | +|
---|---|
OfflineMessageInfo.Provider()
+
++ Creates a new Provider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a OfflineMessageInfo packet (extension sub-packet). |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OfflineMessageInfo.Provider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parseExtension
in interface PacketExtensionProvider
parser
- the XML parser, positioned at the starting element of the extension.
+Exception
- if a parsing error occurs.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.OfflineMessageInfo +
public class OfflineMessageInfo
+OfflineMessageInfo is an extension included in the retrieved offline messages requested by
+ the OfflineMessageManager
. This extension includes a stamp
+ that uniquely identifies the offline message. This stamp may be used for deleting the offline
+ message. The stamp may be of the form UTC timestamps but it is not required to have that format.
+
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+OfflineMessageInfo.Provider
+
++ |
+
+Constructor Summary | +|
---|---|
OfflineMessageInfo()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the XML element name of the extension sub-packet root element. |
+
+ String |
+getNamespace()
+
++ Returns the XML namespace of the extension sub-packet root element. |
+
+ String |
+getNode()
+
++ Returns the stamp that uniquely identifies the offline message. |
+
+ void |
+setNode(String node)
+
++ Sets the stamp that uniquely identifies the offline message. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OfflineMessageInfo()+
+Method Detail | +
---|
+public String getElementName()+
+
getElementName
in interface PacketExtension
+public String getNamespace()+
+
getNamespace
in interface PacketExtension
+public String getNode()+
+
+public void setNode(String node)+
+
node
- the stamp that uniquely identifies the offline message.+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.OfflineMessageRequest.Item +
public static class OfflineMessageRequest.Item
+Item child that holds information about offline messages to view or delete. +
+ +
+
+Constructor Summary | +|
---|---|
OfflineMessageRequest.Item(String node)
+
++ Creates a new item child. |
+
+Method Summary | +|
---|---|
+ String |
+getAction()
+
++ Returns "view" or "remove" that indicate if the server should return the specified + offline message or delete it. |
+
+ String |
+getJid()
+
++ |
+
+ String |
+getNode()
+
++ |
+
+ void |
+setAction(String action)
+
++ Sets if the server should return the specified offline message or delete it. |
+
+ void |
+setJid(String jid)
+
++ |
+
+ String |
+toXML()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OfflineMessageRequest.Item(String node)+
+
node
- the actor's affiliation to the room+Method Detail | +
---|
+public String getNode()+
+public String getAction()+
+
+public void setAction(String action)+
+
action
- if the server should return the specified offline message or delete it.+public String getJid()+
+public void setJid(String jid)+
+public String toXML()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.OfflineMessageRequest.Provider +
public static class OfflineMessageRequest.Provider
+
+Constructor Summary | +|
---|---|
OfflineMessageRequest.Provider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OfflineMessageRequest.Provider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.OfflineMessageRequest +
public class OfflineMessageRequest
+Represents a request to get some or all the offline messages of a user. This class can also + be used for deleting some or all the offline messages of a user. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+OfflineMessageRequest.Item
+
++ Item child that holds information about offline messages to view or delete. |
+
+static class |
+OfflineMessageRequest.Provider
+
++ |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
OfflineMessageRequest()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addItem(OfflineMessageRequest.Item item)
+
++ Adds an item child that holds information about offline messages to view or delete. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ Iterator |
+getItems()
+
++ Returns an Iterator for item childs that holds information about offline messages to + view or delete. |
+
+ boolean |
+isFetch()
+
++ Returns true if all the offline messages of the user should be retrieved. |
+
+ boolean |
+isPurge()
+
++ Returns true if all the offline messages of the user should be deleted. |
+
+ void |
+setFetch(boolean fetch)
+
++ Sets if all the offline messages of the user should be retrieved. |
+
+ void |
+setPurge(boolean purge)
+
++ Sets if all the offline messages of the user should be deleted. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public OfflineMessageRequest()+
+Method Detail | +
---|
+public Iterator getItems()+
+
+public void addItem(OfflineMessageRequest.Item item)+
+
item
- the item child that holds information about offline messages to view or delete.+public boolean isPurge()+
+
+public void setPurge(boolean purge)+
+
purge
- true if all the offline messages of the user should be deleted.+public boolean isFetch()+
+
+public void setFetch(boolean fetch)+
+
fetch
- true if all the offline messages of the user should be retrieved.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface PrivateData
+Interface to represent private data. Each private data chunk is an XML sub-document + with a root element name and namespace. +
+ +
+
PrivateDataManager
+Method Summary | +|
---|---|
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PrivateData. |
+
+Method Detail | +
---|
+String getElementName()+
+
+String getNamespace()+
+
+String toXML()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.RosterExchange +
public class RosterExchange
+Represents XMPP Roster Item Exchange packets.
+ + The 'jabber:x:roster' namespace (which is not to be confused with the 'jabber:iq:roster' + namespace) is used to send roster items from one client to another. A roster item is sent by + adding to the <message/> element an <x/> child scoped by the 'jabber:x:roster' namespace. This + <x/> element may contain one or more <item/> children (one for each roster item to be sent).
+ + Each <item/> element may possess the following attributes:
+
+ <jid/> -- The id of the contact being sent. This attribute is required.
+ <name/> -- A natural-language nickname for the contact. This attribute is optional.
+ + Each <item/> element may also contain one or more <group/> children specifying the + natural-language name of a user-specified group, for the purpose of categorizing this contact + into one or more roster groups. +
+ +
+
+Constructor Summary | +|
---|---|
RosterExchange()
+
++ Creates a new empty roster exchange package. |
+|
RosterExchange(Roster roster)
+
++ Creates a new roster exchange package with the entries specified in roster. |
+
+Method Summary | +|
---|---|
+ void |
+addRosterEntry(RemoteRosterEntry remoteRosterEntry)
+
++ Adds a remote roster entry to the packet. |
+
+ void |
+addRosterEntry(RosterEntry rosterEntry)
+
++ Adds a roster entry to the packet. |
+
+ String |
+getElementName()
+
++ Returns the XML element name of the extension sub-packet root element. |
+
+ int |
+getEntryCount()
+
++ Returns a count of the entries in the roster exchange. |
+
+ String |
+getNamespace()
+
++ Returns the XML namespace of the extension sub-packet root element. |
+
+ Iterator |
+getRosterEntries()
+
++ Returns an Iterator for the roster entries in the packet. |
+
+ String |
+toXML()
+
++ Returns the XML representation of a Roster Item Exchange according the specification. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public RosterExchange()+
+
+public RosterExchange(Roster roster)+
+
roster
- the roster to send to other XMPP entity.+Method Detail | +
---|
+public void addRosterEntry(RosterEntry rosterEntry)+
+
rosterEntry
- a roster entry to add.+public void addRosterEntry(RemoteRosterEntry remoteRosterEntry)+
+
remoteRosterEntry
- a remote roster entry to add.+public String getElementName()+
+
getElementName
in interface PacketExtension
+public String getNamespace()+
+
getNamespace
in interface PacketExtension
+public Iterator getRosterEntries()+
+
+public int getEntryCount()+
+
+public String toXML()+
+ <message id="MlIpV-4" to="gato1@gato.home" from="gato3@gato.home/Smack"> + <subject>Any subject you want</subject> + <body>This message contains roster items.</body> + <x xmlns="jabber:x:roster"> + <item jid="gato1@gato.home"/> + <item jid="gato2@gato.home"/> + </x> + </message> ++
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.SharedGroupsInfo.Provider +
public static class SharedGroupsInfo.Provider
+Internal Search service Provider. +
+ +
+
+Constructor Summary | +|
---|---|
SharedGroupsInfo.Provider()
+
++ Provider Constructor. |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SharedGroupsInfo.Provider()+
+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.SharedGroupsInfo +
public class SharedGroupsInfo
+IQ packet used for discovering the user's shared groups and for getting the answer back + from the server.
+ + Important note: This functionality is not part of the XMPP spec and it will only work + with Wildfire. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+SharedGroupsInfo.Provider
+
++ Internal Search service Provider. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
SharedGroupsInfo()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ List |
+getGroups()
+
++ Returns a collection with the shared group names returned from the server. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SharedGroupsInfo()+
+Method Detail | +
---|
+public List getGroups()+
+
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.StreamInitiation.Feature +
public class StreamInitiation.Feature
+The feature negotiation portion of the StreamInitiation packet. +
+ +
+
+Constructor Summary | +|
---|---|
StreamInitiation.Feature(DataForm data)
+
++ The dataform can be provided as part of the constructor. |
+
+Method Summary | +|
---|---|
+ DataForm |
+getData()
+
++ Returns the dataform associated with the feature negotiation. |
+
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StreamInitiation.Feature(DataForm data)+
+
data
- The dataform.+Method Detail | +
---|
+public DataForm getData()+
+
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.StreamInitiation.File +
public static class StreamInitiation.File
+
+ +
+
+Constructor Summary | +|
---|---|
StreamInitiation.File(String name,
+ long size)
+
++ Constructor providing the name of the file and its size. |
+
+Method Summary | +|
---|---|
+ Date |
+getDate()
+
++ Returns the date that the file was last modified. |
+
+ String |
+getDesc()
+
++ Returns the description of the file. |
+
+ String |
+getElementName()
+
++ Returns the root element name. |
+
+ String |
+getHash()
+
++ Returns the MD5 sum of the file's contents |
+
+ String |
+getName()
+
++ Returns the file's name. |
+
+ String |
+getNamespace()
+
++ Returns the root element XML namespace. |
+
+ long |
+getSize()
+
++ Returns the file's size. |
+
+ boolean |
+isRanged()
+
++ Returns whether or not the initiator can support a range for the file + tranfer. |
+
+ void |
+setDate(Date date)
+
++ Sets the date that the file was last modified. |
+
+ void |
+setDesc(String desc)
+
++ Sets the description of the file. |
+
+ void |
+setHash(String hash)
+
++ Sets the MD5 sum of the file's contents |
+
+ void |
+setRanged(boolean isRanged)
+
++ True if a range can be provided and false if it cannot. |
+
+ String |
+toXML()
+
++ Returns the XML reppresentation of the PacketExtension. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StreamInitiation.File(String name, + long size)+
+
name
- The name of the file.size
- The size of the file in bytes.+Method Detail | +
---|
+public String getName()+
+
+public long getSize()+
+
+public void setHash(String hash)+
+
hash
- The MD5 sum of the file's contents.+public String getHash()+
+
+public void setDate(Date date)+
+
date
- The date that the file was last modified.+public Date getDate()+
+
+public void setDesc(String desc)+
+
desc
- The description of the file so that the file reciever can
+ know what file it is.+public String getDesc()+
+
+public void setRanged(boolean isRanged)+
+
isRanged
- True if a range can be provided and false if it cannot.+public boolean isRanged()+
+
+public String getElementName()+
PacketExtension
+
getElementName
in interface PacketExtension
+public String getNamespace()+
PacketExtension
+
getNamespace
in interface PacketExtension
+public String toXML()+
PacketExtension
+
toXML
in interface PacketExtension
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.StreamInitiation +
public class StreamInitiation
+The process by which two entities initiate a stream. +
+ +
+
+Nested Class Summary | +|
---|---|
+ class |
+StreamInitiation.Feature
+
++ The feature negotiation portion of the StreamInitiation packet. |
+
+static class |
+StreamInitiation.File
+
++ + size: The size, in bytes, of the data to be sent. + name: The name of the file that the Sender wishes to send. + date: The last modification time of the file. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
StreamInitiation()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ DataForm |
+getFeatureNegotiationForm()
+
++ Returns the data form which contains the valid methods of stream + neotiation and transfer. |
+
+ StreamInitiation.File |
+getFile()
+
++ Returns the file containing the information about the request. |
+
+ String |
+getMimeType()
+
++ Identifies the type of file that is desired to be transfered. |
+
+ String |
+getSessionID()
+
++ Uniquely identifies a stream initiation to the recipient. |
+
+ void |
+setFeatureNegotiationForm(DataForm form)
+
++ Sets the data form which contains the valid methods of stream neotiation + and transfer. |
+
+ void |
+setFile(StreamInitiation.File file)
+
++ Sets the file which contains the information pertaining to the file to be + transfered. |
+
+ void |
+setMimeType(String mimeType)
+
++ The "mime-type" attribute identifies the MIME-type for the data across + the stream. |
+
+ void |
+setSesssionID(String id)
+
++ The "id" attribute is an opaque identifier. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StreamInitiation()+
+Method Detail | +
---|
+public void setSesssionID(String id)+
+
id
- The "id" attribute.+public String getSessionID()+
+
setSesssionID(String)
+public void setMimeType(String mimeType)+
+
mimeType
- The valid mime-type.+public String getMimeType()+
+
setMimeType(String)
+public void setFile(StreamInitiation.File file)+
+
file
- The file identified by the stream initiator to be sent.+public StreamInitiation.File getFile()+
+
+public void setFeatureNegotiationForm(DataForm form)+
+
form
- The dataform containing the methods.+public DataForm getFeatureNegotiationForm()+
+
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.Time +
public class Time
+A Time IQ packet, which is used by XMPP clients to exchange their respective local + times. Clients that wish to fully support the entitity time protocol should register + a PacketListener for incoming time requests that then respond with the local time. + This class can be used to request the time from other clients, such as in the + following code snippet: + +
+ // Request the time from a remote user. + Time timeRequest = new Time(); + timeRequest.setType(IQ.Type.GET); + timeRequest.setTo(someUser@example.com); + + // Create a packet collector to listen for a response. + PacketCollector collector = con.createPacketCollector( + new PacketIDFilter(timeRequest.getPacketID())); + + con.sendPacket(timeRequest); + + // Wait up to 5 seconds for a result. + IQ result = (IQ)collector.nextResult(5000); + if (result != null && result.getType() == IQ.Type.RESULT) { + Time timeResult = (Time)result; + // Do something with result... + }
+ + Warning: this is an non-standard protocol documented by + JEP-90. Because this is a + non-standard protocol, it is subject to change. +
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Time()
+
++ Creates a new Time instance with empty values for all fields. |
+|
Time(Calendar cal)
+
++ Creates a new Time instance using the specified calendar instance as + the time value to send. |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getDisplay()
+
++ Returns the local (non-utc) time in human-friendly format. |
+
+ Date |
+getTime()
+
++ Returns the local time or null if the time hasn't been set. |
+
+ String |
+getTz()
+
++ Returns the time zone. |
+
+ String |
+getUtc()
+
++ Returns the time as a UTC formatted String using the format CCYYMMDDThh:mm:ss. |
+
+ void |
+setDisplay(String display)
+
++ Sets the local time in human-friendly format. |
+
+ void |
+setTime(Date time)
+
++ Sets the time using the local time. |
+
+ void |
+setTz(String tz)
+
++ Sets the time zone. |
+
+ void |
+setUtc(String utc)
+
++ Sets the time using UTC formatted String in the format CCYYMMDDThh:mm:ss. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Time()+
+
+public Time(Calendar cal)+
+
cal
- the time value.+Method Detail | +
---|
+public Date getTime()+
+
+public void setTime(Date time)+
+
time
- the current local time.+public String getUtc()+
+
+public void setUtc(String utc)+
+
utc
- the time using a formatted String.+public String getTz()+
+
+public void setTz(String tz)+
+
tz
- the time zone.+public String getDisplay()+
+
+public void setDisplay(String display)+
+
display
- the local time in human-friendly format.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.VCard +
public class VCard
+A VCard class for use with the + SMACK jabber library.
+
+ You should refer to the + JEP-54 documentation.+
+ Please note that this class is incomplete but it does provide the most commonly found + information in vCards. Also remember that VCard transfer is not a standard, and the protocol + may change or be replaced.+
+ Usage: ++ + // To save VCard: + + VCard vCard = new VCard(); + vCard.setFirstName("kir"); + vCard.setLastName("max"); + vCard.setEmailHome("foo@fee.bar"); + vCard.setJabberId("jabber@id.org"); + vCard.setOrganization("Jetbrains, s.r.o"); + vCard.setNickName("KIR"); + + vCard.setField("TITLE", "Mr"); + vCard.setAddressFieldHome("STREET", "Some street"); + vCard.setAddressFieldWork("CTRY", "US"); + vCard.setPhoneWork("FAX", "3443233"); + + vCard.save(connection); + + // To load VCard: + + VCard vCard = new VCard(); + vCard.load(conn); // load own VCard + vCard.load(conn, "joe@foo.bar"); // load someone's VCard ++
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
VCard()
+
++ |
+
+Method Summary | +|
---|---|
+ boolean |
+equals(Object o)
+
++ |
+
+ String |
+getAddressFieldHome(String addrField)
+
++ Get home address field |
+
+ String |
+getAddressFieldWork(String addrField)
+
++ Get work address field |
+
+ byte[] |
+getAvatar()
+
++ Return the byte representation of the avatar(if one exists), otherwise returns null if + no avatar could be found. |
+
+ String |
+getAvatarHash()
+
++ Returns the SHA-1 Hash of the Avatar image. |
+
+static byte[] |
+getBytes(URL url)
+
++ Common code for getting the bytes of a url. |
+
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getEmailHome()
+
++ |
+
+ String |
+getEmailWork()
+
++ |
+
+ String |
+getField(String field)
+
++ Set generic VCard field. |
+
+ String |
+getFirstName()
+
++ |
+
+ String |
+getJabberId()
+
++ |
+
+ String |
+getLastName()
+
++ |
+
+ String |
+getMiddleName()
+
++ |
+
+ String |
+getNickName()
+
++ |
+
+ String |
+getOrganization()
+
++ |
+
+ String |
+getOrganizationUnit()
+
++ |
+
+ String |
+getPhoneHome(String phoneType)
+
++ Get home phone number |
+
+ String |
+getPhoneWork(String phoneType)
+
++ Get work phone number |
+
+ int |
+hashCode()
+
++ |
+
+ void |
+load(XMPPConnection connection)
+
++ Load VCard information for a connected user. |
+
+ void |
+load(XMPPConnection connection,
+ String user)
+
++ Load VCard information for a given user. |
+
+ void |
+save(XMPPConnection connection)
+
++ Save this vCard for the user connected by 'connection'. |
+
+ void |
+setAddressFieldHome(String addrField,
+ String value)
+
++ Set home address field |
+
+ void |
+setAddressFieldWork(String addrField,
+ String value)
+
++ Set work address field |
+
+ void |
+setAvatar(byte[] bytes)
+
++ Specify the bytes for the avatar to use. |
+
+ void |
+setAvatar(URL avatarURL)
+
++ Set the avatar for the VCard by specifying the url to the image. |
+
+ void |
+setEmailHome(String email)
+
++ |
+
+ void |
+setEmailWork(String emailWork)
+
++ |
+
+ void |
+setEncodedImage(String encodedAvatar)
+
++ Set the encoded avatar string. |
+
+ void |
+setField(String field,
+ String value)
+
++ Set generic VCard field. |
+
+ void |
+setFirstName(String firstName)
+
++ |
+
+ void |
+setJabberId(String jabberId)
+
++ |
+
+ void |
+setLastName(String lastName)
+
++ |
+
+ void |
+setMiddleName(String middleName)
+
++ |
+
+ void |
+setNickName(String nickName)
+
++ |
+
+ void |
+setOrganization(String organization)
+
++ |
+
+ void |
+setOrganizationUnit(String organizationUnit)
+
++ |
+
+ void |
+setPhoneHome(String phoneType,
+ String phoneNum)
+
++ Set home phone number |
+
+ void |
+setPhoneWork(String phoneType,
+ String phoneNum)
+
++ Set work phone number |
+
+ String |
+toString()
+
++ |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public VCard()+
+Method Detail | +
---|
+public String getField(String field)+
+
field
- value of field. Possible values: NICKNAME, PHOTO, BDAY, JABBERID, MAILER, TZ,
+ GEO, TITLE, ROLE, LOGO, NOTE, PRODID, REV, SORT-STRING, SOUND, UID, URL, DESC.+public void setField(String field, + String value)+
+
value
- value of fieldfield
- field to set. See getField(String)
getField(String)
+public String getFirstName()+
+public void setFirstName(String firstName)+
+public String getLastName()+
+public void setLastName(String lastName)+
+public String getMiddleName()+
+public void setMiddleName(String middleName)+
+public String getNickName()+
+public void setNickName(String nickName)+
+public String getEmailHome()+
+public void setEmailHome(String email)+
+public String getEmailWork()+
+public void setEmailWork(String emailWork)+
+public String getJabberId()+
+public void setJabberId(String jabberId)+
+public String getOrganization()+
+public void setOrganization(String organization)+
+public String getOrganizationUnit()+
+public void setOrganizationUnit(String organizationUnit)+
+public String getAddressFieldHome(String addrField)+
+
addrField
- one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
+ LOCALITY, REGION, PCODE, CTRY+public void setAddressFieldHome(String addrField, + String value)+
+
addrField
- one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
+ LOCALITY, REGION, PCODE, CTRY+public String getAddressFieldWork(String addrField)+
+
addrField
- one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
+ LOCALITY, REGION, PCODE, CTRY+public void setAddressFieldWork(String addrField, + String value)+
+
addrField
- one of POSTAL, PARCEL, (DOM | INTL), PREF, POBOX, EXTADR, STREET,
+ LOCALITY, REGION, PCODE, CTRY+public void setPhoneHome(String phoneType, + String phoneNum)+
+
phoneType
- one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREFphoneNum
- phone number+public String getPhoneHome(String phoneType)+
+
phoneType
- one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF+public void setPhoneWork(String phoneType, + String phoneNum)+
+
phoneType
- one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREFphoneNum
- phone number+public String getPhoneWork(String phoneType)+
+
phoneType
- one of VOICE, FAX, PAGER, MSG, CELL, VIDEO, BBS, MODEM, ISDN, PCS, PREF+public void setAvatar(URL avatarURL)+
+
avatarURL
- the url to the image(png,jpeg,gif,bmp)+public void setAvatar(byte[] bytes)+
+
bytes
- the bytes of the avatar.+public void setEncodedImage(String encodedAvatar)+
+
encodedAvatar
- the encoded avatar string.+public byte[] getAvatar()+
+ // Load Avatar from VCard + byte[] avatarBytes = vCard.getAvatar(); + + // To create an ImageIcon for Swing applications + ImageIcon icon = new ImageIcon(avatar); + + // To create just an image object from the bytes + ByteArrayInputStream bais = new ByteArrayInputStream(avatar); + try { + Image image = ImageIO.read(bais); + } + catch (IOException e) { + e.printStackTrace(); + } ++
+
+public static byte[] getBytes(URL url) + throws IOException+
+
url
- the url to read.
+IOException
+public String getAvatarHash()+
+
+public void save(XMPPConnection connection) + throws XMPPException+
+
+ NOTE: the method is asynchronous and does not wait for the returned value. ++
connection
- the XMPPConnection to use.
+XMPPException
- thrown if there was an issue setting the VCard in the server.+public void load(XMPPConnection connection) + throws XMPPException+
+
XMPPException
+public void load(XMPPConnection connection, + String user) + throws XMPPException+
+
XMPPException
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+public boolean equals(Object o)+
equals
in class Object
+public int hashCode()+
hashCode
in class Object
+public String toString()+
toString
in class Object
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.packet.Version +
public class Version
+A Version IQ packet, which is used by XMPP clients to discover version information + about the software running at another entity's JID.
+ + An example to discover the version of the server: +
+ // Request the version from the server. + Version versionRequest = new Version(); + timeRequest.setType(IQ.Type.GET); + timeRequest.setTo("example.com"); + + // Create a packet collector to listen for a response. + PacketCollector collector = con.createPacketCollector( + new PacketIDFilter(versionRequest.getPacketID())); + + con.sendPacket(versionRequest); + + // Wait up to 5 seconds for a result. + IQ result = (IQ)collector.nextResult(5000); + if (result != null && result.getType() == IQ.Type.RESULT) { + Version versionResult = (Version)result; + // Do something with result... + }
+
+ +
+
+Nested Class Summary | +
---|
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
Version()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ String |
+getName()
+
++ Returns the natural-language name of the software. |
+
+ String |
+getOs()
+
++ Returns the operating system of the queried entity. |
+
+ String |
+getVersion()
+
++ Returns the specific version of the software. |
+
+ void |
+setName(String name)
+
++ Sets the natural-language name of the software. |
+
+ void |
+setOs(String os)
+
++ Sets the operating system of the queried entity. |
+
+ void |
+setVersion(String version)
+
++ Sets the specific version of the software. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Version()+
+Method Detail | +
---|
+public String getName()+
+
+public void setName(String name)+
+
name
- the natural-language name of the software.+public String getVersion()+
+
+public void setVersion(String version)+
+
version
- the specific version of the software.+public String getOs()+
+
+public void setOs(String os)+
+
os
- operating system of the queried entity.+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.packet.XHTMLExtension +
public class XHTMLExtension
+An XHTML sub-packet, which is used by XMPP clients to exchange formatted text. The XHTML + extension is only a subset of XHTML 1.0.
+ + The following link summarizes the requirements of XHTML IM: + Valid tags.
+ + Warning: this is an non-standard protocol documented by + JEP-71. Because this is a + non-standard protocol, it is subject to change. +
+ +
+
+Constructor Summary | +|
---|---|
XHTMLExtension()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addBody(String body)
+
++ Adds a body to the packet. |
+
+ Iterator |
+getBodies()
+
++ Returns an Iterator for the bodies in the packet. |
+
+ int |
+getBodiesCount()
+
++ Returns a count of the bodies in the XHTML packet. |
+
+ String |
+getElementName()
+
++ Returns the XML element name of the extension sub-packet root element. |
+
+ String |
+getNamespace()
+
++ Returns the XML namespace of the extension sub-packet root element. |
+
+ String |
+toXML()
+
++ Returns the XML representation of a XHTML extension according the specification. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public XHTMLExtension()+
+Method Detail | +
---|
+public String getElementName()+
+
getElementName
in interface PacketExtension
+public String getNamespace()+
+
getNamespace
in interface PacketExtension
+public String toXML()+
+ <message id="MlIpV-4" to="gato1@gato.home" from="gato3@gato.home/Smack"> + <subject>Any subject you want</subject> + <body>This message contains something interesting.</body> + <html xmlns="http://jabber.org/protocol/xhtml-im"> + <body><p style='font-size:large'>This message contains something <em>interesting</em>.</p></body> + </html> + </message> ++
+
toXML
in interface PacketExtension
+public Iterator getBodies()+
+
+public void addBody(String body)+
+
body
- the body to add.+public int getBodiesCount()+
+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +PrivateData |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
PrivateData | +Interface to represent private data. | +
+ +
+Class Summary | +|
---|---|
Bytestream | +A packet representing part of a Socks5 Bytestream negotiation. | +
Bytestream.Activate | +The packet sent by the stream initiator to the stream proxy to activate + the connection. | +
Bytestream.Mode | +The stream can be either a TCP stream or a UDP stream. | +
Bytestream.StreamHost | +Packet extension that represents a potential Socks5 proxy for the file + transfer. | +
Bytestream.StreamHostUsed | +After selected a Socks5 stream host and successfully connecting, the + target of the file transfer returns a byte stream packet with the stream + host used extension. | +
DataForm | +Represents a form that could be use for gathering data as well as for reporting data + returned from a search. | +
DataForm.Item | +Represents items of reported data. | +
DataForm.ReportedData | +Represents the fields that will be returned from a search. | +
DefaultPrivateData | +Default implementation of the PrivateData interface. | +
DelayInformation | +Represents timestamp information about data stored for later delivery. | +
DiscoverInfo | +A DiscoverInfo IQ packet, which is used by XMPP clients to request and receive information + to/from other XMPP entities. | +
DiscoverInfo.Feature | +Represents the features offered by the item. | +
DiscoverInfo.Identity | +Represents the identity of a given XMPP entity. | +
DiscoverItems | +A DiscoverItems IQ packet, which is used by XMPP clients to request and receive items + associated with XMPP entities. | +
DiscoverItems.Item | +An item is associated with an XMPP Entity, usually thought of a children of the parent + entity and normally are addressable as a JID. | +
IBBExtensions | +The different extensions used throughtout the negotiation and transfer + process. | +
IBBExtensions.Close | +Represents the closing of the file transfer. | +
IBBExtensions.Data | +A data packet containing a portion of the file being sent encoded in + base64. | +
IBBExtensions.Open | +Represents a request to open the file transfer. | +
LastActivity | +A last activity IQ for retrieving information about the last activity associated with a Jabber ID. | +
LastActivity.Provider | +The IQ Provider for LastActivity. | +
MessageEvent | +Represents message events relating to the delivery, display, composition and cancellation of + messages. | +
MUCAdmin | +IQ packet that serves for kicking users, granting and revoking voice, banning users, + modifying the ban list, granting and revoking membership and granting and revoking + moderator privileges. | +
MUCAdmin.Item | +Item child that holds information about roles, affiliation, jids and nicks. | +
MUCInitialPresence | +Represents extended presence information whose sole purpose is to signal the ability of + the occupant to speak the MUC protocol when joining a room. | +
MUCInitialPresence.History | +The History class controls the number of characters or messages to receive + when entering a room. | +
MUCOwner | +IQ packet that serves for granting and revoking ownership privileges, granting + and revoking administrative privileges and destroying a room. | +
MUCOwner.Destroy | +Represents a request to the server to destroy a room. | +
MUCOwner.Item | +Item child that holds information about affiliation, jids and nicks. | +
MUCUser | +Represents extended presence information about roles, affiliations, full JIDs, + or status codes scoped by the 'http://jabber.org/protocol/muc#user' namespace. | +
MUCUser.Decline | +Represents a rejection to an invitation from another user to a room. | +
MUCUser.Destroy | +Represents a notification that the room has been destroyed. | +
MUCUser.Invite | +Represents an invitation for another user to a room. | +
MUCUser.Item | +Item child that holds information about roles, affiliation, jids and nicks. | +
MUCUser.Status | +Status code assists in presenting notification messages. | +
MultipleAddresses | +Packet extension that contains the list of addresses that a packet should be sent or was sent. | +
MultipleAddresses.Address | ++ |
OfflineMessageInfo | +OfflineMessageInfo is an extension included in the retrieved offline messages requested by
+ the OfflineMessageManager . |
+
OfflineMessageInfo.Provider | ++ |
OfflineMessageRequest | +Represents a request to get some or all the offline messages of a user. | +
OfflineMessageRequest.Item | +Item child that holds information about offline messages to view or delete. | +
OfflineMessageRequest.Provider | ++ |
RosterExchange | +Represents XMPP Roster Item Exchange packets. | +
SharedGroupsInfo | +IQ packet used for discovering the user's shared groups and for getting the answer back + from the server. | +
SharedGroupsInfo.Provider | +Internal Search service Provider. | +
StreamInitiation | +The process by which two entities initiate a stream. | +
StreamInitiation.File | ++ size: The size, in bytes, of the data to be sent. + name: The name of the file that the Sender wishes to send. + date: The last modification time of the file. | +
Time | +A Time IQ packet, which is used by XMPP clients to exchange their respective local + times. | +
VCard | +A VCard class for use with the + SMACK jabber library. | +
Version | +A Version IQ packet, which is used by XMPP clients to discover version information + about the software running at another entity's JID. | +
XHTMLExtension | +An XHTML sub-packet, which is used by XMPP clients to exchange formatted text. | +
+XML packets that are part of the XMPP extension protocols. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.BytestreamsProvider +
public class BytestreamsProvider
+Parses a bytestream packet. +
+ +
+
+Constructor Summary | +|
---|---|
BytestreamsProvider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public BytestreamsProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.DataFormProvider +
public class DataFormProvider
+The DataFormProvider parses DataForm packets. +
+ +
+
+Constructor Summary | +|
---|---|
DataFormProvider()
+
++ Creates a new DataFormProvider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse an extension sub-packet and create a PacketExtension instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DataFormProvider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
PacketExtensionProvider
+
parseExtension
in interface PacketExtensionProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.DelayInformationProvider +
public class DelayInformationProvider
+The DelayInformationProvider parses DelayInformation packets. +
+ +
+
+Constructor Summary | +|
---|---|
DelayInformationProvider()
+
++ Creates a new DeliveryInformationProvider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse an extension sub-packet and create a PacketExtension instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DelayInformationProvider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
PacketExtensionProvider
+
parseExtension
in interface PacketExtensionProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.DiscoverInfoProvider +
public class DiscoverInfoProvider
+The DiscoverInfoProvider parses Service Discovery information packets. +
+ +
+
+Constructor Summary | +|
---|---|
DiscoverInfoProvider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DiscoverInfoProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.DiscoverItemsProvider +
public class DiscoverItemsProvider
+The DiscoverInfoProvider parses Service Discovery items packets. +
+ +
+
+Constructor Summary | +|
---|---|
DiscoverItemsProvider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DiscoverItemsProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.IBBProviders.Close +
public static class IBBProviders.Close
+Parses a close IBB packet. +
+ +
+
+Constructor Summary | +|
---|---|
IBBProviders.Close()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public IBBProviders.Close()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.IBBProviders.Data +
public static class IBBProviders.Data
+Parses a data IBB packet. +
+ +
+
+Constructor Summary | +|
---|---|
IBBProviders.Data()
+
++ |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse an extension sub-packet and create a PacketExtension instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public IBBProviders.Data()+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
PacketExtensionProvider
+
parseExtension
in interface PacketExtensionProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.IBBProviders.Open +
public static class IBBProviders.Open
+Parses an open IBB packet. +
+ +
+
+Constructor Summary | +|
---|---|
IBBProviders.Open()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public IBBProviders.Open()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.IBBProviders +
public class IBBProviders
+Parses an IBB packet. +
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+IBBProviders.Close
+
++ Parses a close IBB packet. |
+
+static class |
+IBBProviders.Data
+
++ Parses a data IBB packet. |
+
+static class |
+IBBProviders.Open
+
++ Parses an open IBB packet. |
+
+Constructor Summary | +|
---|---|
IBBProviders()
+
++ |
+
+Method Summary | +
---|
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public IBBProviders()+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.MUCAdminProvider +
public class MUCAdminProvider
+The MUCAdminProvider parses MUCAdmin packets. (@see MUCAdmin) +
+ +
+
+Constructor Summary | +|
---|---|
MUCAdminProvider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCAdminProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.MUCOwnerProvider +
public class MUCOwnerProvider
+The MUCOwnerProvider parses MUCOwner packets. (@see MUCOwner) +
+ +
+
+Constructor Summary | +|
---|---|
MUCOwnerProvider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCOwnerProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.MUCUserProvider +
public class MUCUserProvider
+The MUCUserProvider parses packets with extended presence information about + roles and affiliations. +
+ +
+
+Constructor Summary | +|
---|---|
MUCUserProvider()
+
++ Creates a new MUCUserProvider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a MUCUser packet (extension sub-packet). |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MUCUserProvider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parseExtension
in interface PacketExtensionProvider
parser
- the XML parser, positioned at the starting element of the extension.
+Exception
- if a parsing error occurs.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.MessageEventProvider +
public class MessageEventProvider
+The MessageEventProvider parses Message Event packets. +
+ +
+
+Constructor Summary | +|
---|---|
MessageEventProvider()
+
++ Creates a new MessageEventProvider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a MessageEvent packet (extension sub-packet). |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MessageEventProvider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parseExtension
in interface PacketExtensionProvider
parser
- the XML parser, positioned at the starting element of the extension.
+Exception
- if a parsing error occurs.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.MultipleAddressesProvider +
public class MultipleAddressesProvider
+The MultipleAddressesProvider parses MultipleAddresses
packets.
+
+ +
+
+Constructor Summary | +|
---|---|
MultipleAddressesProvider()
+
++ Creates a new MultipleAddressesProvider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse an extension sub-packet and create a PacketExtension instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public MultipleAddressesProvider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
PacketExtensionProvider
+
parseExtension
in interface PacketExtensionProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface PrivateDataProvider
+An interface for parsing custom private data. Each PrivateDataProvider must + be registered with the PrivateDataManager class for it to be used. Every implementation + of this interface must have a public, no-argument constructor. +
+ +
+
+Method Summary | +|
---|---|
+ PrivateData |
+parsePrivateData(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the private data sub-document and create a PrivateData instance. |
+
+Method Detail | +
---|
+PrivateData parsePrivateData(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.RosterExchangeProvider +
public class RosterExchangeProvider
+The RosterExchangeProvider parses RosterExchange packets. +
+ +
+
+Constructor Summary | +|
---|---|
RosterExchangeProvider()
+
++ Creates a new RosterExchangeProvider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a RosterExchange packet (extension sub-packet). |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public RosterExchangeProvider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parseExtension
in interface PacketExtensionProvider
parser
- the XML parser, positioned at the starting element of the extension.
+Exception
- if a parsing error occurs.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.StreamInitiationProvider +
public class StreamInitiationProvider
+The StreamInitiationProvider parses StreamInitiation packets. +
+ +
+
+Constructor Summary | +|
---|---|
StreamInitiationProvider()
+
++ |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StreamInitiationProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.VCardProvider +
public class VCardProvider
+vCard provider. +
+ +
+
+Constructor Summary | +|
---|---|
VCardProvider()
+
++ |
+
+Method Summary | +|
---|---|
+static VCard |
+_createVCardFromXml(String xmlText)
+
++ |
+
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public VCardProvider()+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.+public static VCard _createVCardFromXml(String xmlText)+
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.provider.XHTMLExtensionProvider +
public class XHTMLExtensionProvider
+The XHTMLExtensionProvider parses XHTML packets. +
+ +
+
+Constructor Summary | +|
---|---|
XHTMLExtensionProvider()
+
++ Creates a new XHTMLExtensionProvider. |
+
+Method Summary | +|
---|---|
+ PacketExtension |
+parseExtension(org.xmlpull.v1.XmlPullParser parser)
+
++ Parses a XHTMLExtension packet (extension sub-packet). |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public XHTMLExtensionProvider()+
+
+Method Detail | +
---|
+public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
+
parseExtension
in interface PacketExtensionProvider
parser
- the XML parser, positioned at the starting element of the extension.
+Exception
- if a parsing error occurs.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +PrivateDataProvider |
+
+Classes
+
+ +BytestreamsProvider + +DataFormProvider + +DelayInformationProvider + +DiscoverInfoProvider + +DiscoverItemsProvider + +IBBProviders + +IBBProviders.Close + +IBBProviders.Data + +IBBProviders.Open + +MessageEventProvider + +MUCAdminProvider + +MUCOwnerProvider + +MUCUserProvider + +MultipleAddressesProvider + +RosterExchangeProvider + +StreamInitiationProvider + +VCardProvider + +XHTMLExtensionProvider |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
PrivateDataProvider | +An interface for parsing custom private data. | +
+ +
+Class Summary | +|
---|---|
BytestreamsProvider | +Parses a bytestream packet. | +
DataFormProvider | +The DataFormProvider parses DataForm packets. | +
DelayInformationProvider | +The DelayInformationProvider parses DelayInformation packets. | +
DiscoverInfoProvider | +The DiscoverInfoProvider parses Service Discovery information packets. | +
DiscoverItemsProvider | +The DiscoverInfoProvider parses Service Discovery items packets. | +
IBBProviders | +Parses an IBB packet. | +
IBBProviders.Close | +Parses a close IBB packet. | +
IBBProviders.Data | +Parses a data IBB packet. | +
IBBProviders.Open | +Parses an open IBB packet. | +
MessageEventProvider | +The MessageEventProvider parses Message Event packets. | +
MUCAdminProvider | +The MUCAdminProvider parses MUCAdmin packets. | +
MUCOwnerProvider | +The MUCOwnerProvider parses MUCOwner packets. | +
MUCUserProvider | +The MUCUserProvider parses packets with extended presence information about + roles and affiliations. | +
MultipleAddressesProvider | +The MultipleAddressesProvider parses MultipleAddresses packets. |
+
RosterExchangeProvider | +The RosterExchangeProvider parses RosterExchange packets. | +
StreamInitiationProvider | +The StreamInitiationProvider parses StreamInitiation packets. | +
VCardProvider | +vCard provider. | +
XHTMLExtensionProvider | +The XHTMLExtensionProvider parses XHTML packets. | +
+Provides pluggable parsing logic for Smack extensions. +
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.search.UserSearch.Provider +
public static class UserSearch.Provider
+Internal Search service Provider. +
+ +
+
+Constructor Summary | +|
---|---|
UserSearch.Provider()
+
++ Provider Constructor. |
+
+Method Summary | +|
---|---|
+ IQ |
+parseIQ(org.xmlpull.v1.XmlPullParser parser)
+
++ Parse the IQ sub-document and create an IQ instance. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public UserSearch.Provider()+
+
+Method Detail | +
---|
+public IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) + throws Exception+
IQProvider
+
parseIQ
in interface IQProvider
parser
- an XML parser.
+Exception
- if an error occurs parsing the XML.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smack.packet.Packet +
org.jivesoftware.smack.packet.IQ +
org.jivesoftware.smackx.search.UserSearch +
public class UserSearch
+Implements the protocol currently used to search information repositories on the Jabber network. To date, the jabber:iq:search protocol + has been used mainly to search for people who have registered with user directories (e.g., the "Jabber User Directory" hosted at users.jabber.org). + However, the jabber:iq:search protocol is not limited to user directories, and could be used to search other Jabber information repositories + (such as chatroom directories) or even to provide a Jabber interface to conventional search engines. +
+ The basic functionality is to query an information repository regarding the possible search fields, to send a search query, and to receive search results. ++ +
+
+Nested Class Summary | +|
---|---|
+static class |
+UserSearch.Provider
+
++ Internal Search service Provider. |
+
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ | +
---|
IQ.Type |
+
+Field Summary | +
---|
Fields inherited from class org.jivesoftware.smack.packet.Packet | +
---|
ID_NOT_AVAILABLE |
+
+Constructor Summary | +|
---|---|
UserSearch()
+
++ Creates a new instance of UserSearch. |
+
+Method Summary | +|
---|---|
+ String |
+getChildElementXML()
+
++ Returns the sub-element XML section of the IQ packet, or null if there + isn't one. |
+
+ Form |
+getSearchForm(XMPPConnection con,
+ String searchService)
+
++ Returns the form for all search fields supported by the search service. |
+
+ ReportedData |
+sendSearchForm(XMPPConnection con,
+ Form searchForm,
+ String searchService)
+
++ Sends the filled out answer form to be sent and queried by the search service. |
+
+ ReportedData |
+sendSimpleSearchForm(XMPPConnection con,
+ Form searchForm,
+ String searchService)
+
++ Sends the filled out answer form to be sent and queried by the search service. |
+
Methods inherited from class org.jivesoftware.smack.packet.IQ | +
---|
getType, setType, toXML |
+
Methods inherited from class org.jivesoftware.smack.packet.Packet | +
---|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public UserSearch()+
+
+Method Detail | +
---|
+public String getChildElementXML()+
IQ
+ + Extensions of this class must override this method. +
+
getChildElementXML
in class IQ
+public Form getSearchForm(XMPPConnection con, + String searchService) + throws XMPPException+
+
con
- the current XMPPConnection.searchService
- the search service to use. (ex. search.jivesoftware.com)
+XMPPException
- thrown if a server error has occurred.+public ReportedData sendSearchForm(XMPPConnection con, + Form searchForm, + String searchService) + throws XMPPException+
+
con
- the current XMPPConnection.searchForm
- the Form
to send for querying.searchService
- the search service to use. (ex. search.jivesoftware.com)
+XMPPException
- thrown if a server error has occurred.+public ReportedData sendSimpleSearchForm(XMPPConnection con, + Form searchForm, + String searchService) + throws XMPPException+
+
con
- the current XMPPConnection.searchForm
- the Form
to send for querying.searchService
- the search service to use. (ex. search.jivesoftware.com)
+XMPPException
- thrown if a server error has occurred.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object ++org.jivesoftware.smackx.search.UserSearchManager +
public class UserSearchManager
+The UserSearchManager is a facade built upon Jabber Search Services (JEP-055) to allow for searching + repositories on a Jabber Server. This implementation allows for transparency of implementation of + searching (DataForms or No DataForms), but allows the user to simply use the DataForm model for both + types of support. +
+ XMPPConnection con = new XMPPConnection("jabber.org"); + con.login("john", "doe"); + UserSearchManager search = new UserSearchManager(con, "users.jabber.org"); + Form searchForm = search.getSearchForm(); + Form answerForm = searchForm.createAnswerForm(); + answerForm.setAnswer("last", "DeMoro"); + ReportedData data = search.getSearchResults(answerForm); + // Use Returned Data ++
+ +
+
+Constructor Summary | +|
---|---|
UserSearchManager(XMPPConnection con)
+
++ Creates a new UserSearchManager. |
+
+Method Summary | +|
---|---|
+ Form |
+getSearchForm(String searchService)
+
++ Returns the form to fill out to perform a search. |
+
+ ReportedData |
+getSearchResults(Form searchForm,
+ String searchService)
+
++ Submits a search form to the server and returns the resulting information + in the form of ReportedData |
+
+ Collection |
+getSearchServices()
+
++ Returns a collection of search services found on the server. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public UserSearchManager(XMPPConnection con)+
+
con
- the XMPPConnection to use.+Method Detail | +
---|
+public Form getSearchForm(String searchService) + throws XMPPException+
+
searchService
- the search service to query.
+XMPPException
- thrown if a server error has occurred.+public ReportedData getSearchResults(Form searchForm, + String searchService) + throws XMPPException+
ReportedData
++
searchForm
- the Form
to submit for searching.searchService
- the name of the search service to use.
+XMPPException
- thrown if a server error has occurred.+public Collection getSearchServices() + throws XMPPException+
+
XMPPException
- thrown if a server error has occurred.
+
+
|
++Smack + | +||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +UserSearch + +UserSearch.Provider + +UserSearchManager |
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
UserSearch | +Implements the protocol currently used to search information repositories on the Jabber network. | +
UserSearch.Provider | +Internal Search service Provider. | +
UserSearchManager | +The UserSearchManager is a facade built upon Jabber Search Services (JEP-055) to allow for searching + repositories on a Jabber Server. | +
+
+
+
|
++Smack + | +||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Smack | +
---|
+ + + Index: lams_tool_chat/lib/smack-2.2.0/javadoc/overview-summary.html =================================================================== diff -u --- lams_tool_chat/lib/smack-2.2.0/javadoc/overview-summary.html (revision 0) +++ lams_tool_chat/lib/smack-2.2.0/javadoc/overview-summary.html (revision 9b94e56785537e7f5c45b91d506ff36caf3b08d0) @@ -0,0 +1,217 @@ + + + +
+ +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Packages | +|
---|---|
org.jivesoftware.smack | +Core classes of the Smack API. | +
org.jivesoftware.smack.debugger | +Core debugger functionality. | +
org.jivesoftware.smack.filter | +Allows PacketCollector and PacketListener instances to filter for packets with particular attributes. |
+
org.jivesoftware.smack.packet | +XML packets that are part of the XMPP protocol. | +
org.jivesoftware.smack.provider | +Provides pluggable parsing of incoming IQ's and packet extensions. | +
org.jivesoftware.smack.sasl | +SASL Mechanisms. | +
org.jivesoftware.smack.util | +Utility classes. | +
org.jivesoftware.smackx | +Smack extensions API. | +
org.jivesoftware.smackx.debugger | +Smack optional Debuggers. | +
org.jivesoftware.smackx.filetransfer | ++ |
org.jivesoftware.smackx.muc | +Classes and Interfaces that implement Multi-User Chat (MUC). | +
org.jivesoftware.smackx.packet | +XML packets that are part of the XMPP extension protocols. | +
org.jivesoftware.smackx.provider | +Provides pluggable parsing logic for Smack extensions. | +
org.jivesoftware.smackx.search | ++ |
+API specification for Smack, an Open Source XMPP client library. +
+The XMPPConnection
class is the main entry point for the API.
+
+ +
+
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Package org.jivesoftware.smack | +
---|
+Class org.jivesoftware.smack.XMPPException extends Exception implements Serializable | +
---|
+Serialized Fields | +
---|
+StreamError streamError+
+XMPPError error+
+Throwable wrappedThrowable+
+
+
+
|
++Smack + | +||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +