public class OperationSetPersistentPresenceIrcImpl extends AbstractOperationSetPersistentPresence<ProtocolProviderServiceIrcImpl>
parentProvider
Modifier | Constructor and Description |
---|---|
protected |
OperationSetPersistentPresenceIrcImpl(ProtocolProviderServiceIrcImpl parentProvider)
IRC implementation for OperationSetPersistentPresence.
|
Modifier and Type | Method and Description |
---|---|
void |
createServerStoredContactGroup(ContactGroup parent,
java.lang.String groupName)
Create a "server stored" contact group.
|
ContactIrcImpl |
createUnresolvedContact(java.lang.String address,
java.lang.String persistentData)
Creates an unresolved contact for IRC.
|
ContactIrcImpl |
createUnresolvedContact(java.lang.String address,
java.lang.String persistentData,
ContactGroup parentGroup)
Creates an unresolved contact for IRC.
|
ContactGroupIrcImpl |
createUnresolvedContactGroup(java.lang.String groupUID,
java.lang.String persistentData,
ContactGroup parentGroup)
Create a new unresolved contact group.
|
ContactIrcImpl |
findContactByID(java.lang.String contactID)
Find a contact by its ID.
|
(package private) Contact |
findOrCreateContactByID(java.lang.String id)
Find or create contact by ID.
|
java.lang.String |
getCurrentStatusMessage()
IRC will return the away message if AWAY status is active, or an empty
string if user is not away.
|
PresenceStatus |
getPresenceStatus()
Get current IRC presence status.
|
ContactGroupIrcImpl |
getRootGroup()
Get root contact group.
|
ContactGroup |
getServerStoredContactListRoot()
Get group of contacts that have been discovered while using IRC.
|
java.util.Iterator<PresenceStatus> |
getSupportedStatusSet()
Get set of statuses supported in IRC.
|
void |
moveContactToGroup(Contact contactToMove,
ContactGroup newParent)
Moving contacts to a different group is currently not implemented.
|
void |
publishPresenceStatus(PresenceStatus status,
java.lang.String statusMessage)
Set a new presence status corresponding to the provided arguments.
|
PresenceStatus |
queryContactStatus(java.lang.String contactIdentifier)
Query contact status using WHOIS query to IRC server.
|
void |
removeServerStoredContactGroup(ContactGroup group)
Removing a contact group is currently not implemented.
|
void |
renameServerStoredContactGroup(ContactGroup group,
java.lang.String newName)
Rename contact group.
|
void |
setAuthorizationHandler(AuthorizationHandler handler)
IRC does not support authorization handling, so this is not supported.
|
void |
subscribe(ContactGroup parent,
java.lang.String contactIdentifier)
Subscribes to presence updates for specified contact identifier.
|
void |
subscribe(java.lang.String contactIdentifier)
Subscribes to presence updates for specified contact identifier.
|
void |
unsubscribe(Contact contact)
Unsubscribe for presence change events for specified contact.
|
(package private) void |
updateNick(java.lang.String oldNick,
java.lang.String newNick)
Update the nick/id for an IRC contact.
|
(package private) void |
updateNickContactPresence(java.lang.String nick,
PresenceStatus newStatus)
Update presence based for user's nick.
|
(package private) void |
updatePresenceStatus(PresenceStatus previousStatus,
PresenceStatus status)
Update (from IRC) containing the current presence status and message.
|
addContactPresenceStatusListener, addProviderPresenceStatusListener, addServerStoredGroupChangeListener, addSubscriptionListener, fireContactPresenceStatusChangeEvent, fireContactPresenceStatusChangeEvent, fireContactPresenceStatusChangeEvent, fireContactPropertyChangeEvent, fireProviderStatusChangeEvent, fireProviderStatusChangeEvent, fireProviderStatusMessageChangeEvent, fireServerStoredGroupEvent, fireSubscriptionEvent, fireSubscriptionEvent, fireSubscriptionMovedEvent, getLocalContact, removeContactPresenceStatusListener, removeProviderPresenceStatusListener, removeServerStoredGroupChangeListener, removeSubscriptionListener, setDisplayName
protected OperationSetPersistentPresenceIrcImpl(ProtocolProviderServiceIrcImpl parentProvider)
parentProvider
- IRC instance of protocol provider service.public ContactGroupIrcImpl getRootGroup()
public void subscribe(java.lang.String contactIdentifier) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OperationFailedException
contactIdentifier
- the contact's identifierjava.lang.IllegalArgumentException
- on bad inputjava.lang.IllegalStateException
- if disconnectedOperationFailedException
- on failed operationpublic void subscribe(ContactGroup parent, java.lang.String contactIdentifier) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OperationFailedException
parent
- contact groupcontactIdentifier
- contactOperationFailedException
- if not implementedjava.lang.IllegalArgumentException
- on bad inputjava.lang.IllegalStateException
- if disconnectedpublic void unsubscribe(Contact contact) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OperationFailedException
contact
- contact instancejava.lang.IllegalArgumentException
- on bad inputjava.lang.IllegalStateException
- if disconnectedOperationFailedException
- if something went wrongpublic void createServerStoredContactGroup(ContactGroup parent, java.lang.String groupName) throws OperationFailedException
parent
- parent contact groupgroupName
- new group's nameOperationFailedException
- if not implementedpublic void removeServerStoredContactGroup(ContactGroup group) throws OperationFailedException
group
- contact group to removeOperationFailedException
- if not implementedpublic void renameServerStoredContactGroup(ContactGroup group, java.lang.String newName)
group
- contact group to renamenewName
- new namepublic void moveContactToGroup(Contact contactToMove, ContactGroup newParent) throws OperationFailedException
contactToMove
- contact to movenewParent
- new parent groupOperationFailedException
- if not implementedpublic ContactGroup getServerStoredContactListRoot()
public ContactIrcImpl createUnresolvedContact(java.lang.String address, java.lang.String persistentData)
address
- contact addresspersistentData
- persistent data for contactpublic ContactIrcImpl createUnresolvedContact(java.lang.String address, java.lang.String persistentData, ContactGroup parentGroup)
address
- contact addresspersistentData
- persistent data for contactparentGroup
- parent group to contactpublic ContactGroupIrcImpl createUnresolvedContactGroup(java.lang.String groupUID, java.lang.String persistentData, ContactGroup parentGroup)
groupUID
- unique group idpersistentData
- persistent data is currently not supportedparentGroup
- the parent group for the newly created contact grouppublic PresenceStatus getPresenceStatus()
public void publishPresenceStatus(PresenceStatus status, java.lang.String statusMessage) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OperationFailedException
status
- presence statusstatusMessage
- message for the specified statusjava.lang.IllegalArgumentException
- if the status requested is not a valid
PresenceStatus supported by this provider.java.lang.IllegalStateException
- if the provider is not currently
registered.OperationFailedException
- with code NETWORK_FAILURE if publishing
the status fails due to a network error.void updatePresenceStatus(PresenceStatus previousStatus, PresenceStatus status)
previousStatus
- the previous presence statusstatus
- the current presence statuspublic java.util.Iterator<PresenceStatus> getSupportedStatusSet()
public PresenceStatus queryContactStatus(java.lang.String contactIdentifier) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, OperationFailedException
contactIdentifier
- contact idOperationFailedException
- in case of problems during queryjava.lang.IllegalArgumentException
- if contact is not a contact
known to the underlying protocol providerjava.lang.IllegalStateException
- if the underlying protocol provider is not
registered/signed on a public service.public ContactIrcImpl findContactByID(java.lang.String contactID)
contactID
- ID to look uppublic void setAuthorizationHandler(AuthorizationHandler handler)
handler
- authorization handlerpublic java.lang.String getCurrentStatusMessage()
Contact findOrCreateContactByID(java.lang.String id)
id
- id of the contactvoid updateNickContactPresence(java.lang.String nick, PresenceStatus newStatus)
nick
- the nicknewStatus
- the new statusvoid updateNick(java.lang.String oldNick, java.lang.String newNick)
oldNick
- the old nicknewNick
- the new nick
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.