|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.smack.packet.PrivacyItem
public class PrivacyItem
A privacy item acts a rule that when matched defines if a packet should be blocked or not. Privacy Items can handle different kind of blocking communications based on JID, group, subscription type or globally by:
Nested Class Summary | |
---|---|
static class |
PrivacyItem.PrivacyRule
Privacy Rule represents the kind of action to apply. |
static class |
PrivacyItem.Type
Type defines if the rule is based on JIDs, roster groups or presence subscription types. |
Constructor Summary | |
---|---|
PrivacyItem(String type,
boolean allow,
int order)
Creates a new privacy item. |
Method Summary | |
---|---|
int |
getOrder()
Returns the order where the receiver is processed. |
PrivacyItem.Type |
getType()
Returns the type hold the kind of communication it will allow or block. |
String |
getValue()
Returns the element identifier to apply the action. |
boolean |
isAllow()
Returns the action associated with the item, it MUST be filled and will allow or deny the communication. |
boolean |
isFilterEverything()
Returns whether the receiver allows or denies every kind of communication. |
boolean |
isFilterIQ()
Returns whether the receiver allow or deny incoming IQ stanzas or not. |
boolean |
isFilterMessage()
Returns whether the receiver allows or denies incoming messages or not. |
boolean |
isFilterPresence_in()
Returns whether the receiver allows or denies incoming presence or not. |
boolean |
isFilterPresence_out()
Returns whether the receiver allows or denies incoming presence or not. |
void |
setFilterIQ(boolean filterIQ)
Sets whether the receiver allows or denies incoming IQ stanzas or not. |
void |
setFilterMessage(boolean filterMessage)
Sets wheather the receiver allows or denies incoming messages or not. |
void |
setFilterPresence_in(boolean filterPresence_in)
Sets whether the receiver allows or denies incoming presence or not. |
void |
setFilterPresence_out(boolean filterPresence_out)
Sets whether the receiver allows or denies outgoing presence or not. |
void |
setValue(String value)
Sets the element identifier to apply the action. |
String |
toXML()
Answer an xml representation of the receiver according to the RFC 3921. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrivacyItem(String type, boolean allow, int order)
type
- the type.Method Detail |
---|
public boolean isAllow()
public boolean isFilterIQ()
public void setFilterIQ(boolean filterIQ)
filterIQ
- indicates if the receiver allows or denies incoming IQ stanzas.public boolean isFilterMessage()
public void setFilterMessage(boolean filterMessage)
filterMessage
- indicates if the receiver allows or denies incoming messages or not.public boolean isFilterPresence_in()
public void setFilterPresence_in(boolean filterPresence_in)
filterPresence_in
- indicates if the receiver allows or denies filtering incoming presence.public boolean isFilterPresence_out()
public void setFilterPresence_out(boolean filterPresence_out)
filterPresence_out
- indicates if the receiver allows or denies filtering outgoing presencepublic int getOrder()
public void setValue(String value)
value
- is the identifier to apply the action.public PrivacyItem.Type getType()
public String getValue()
public boolean isFilterEverything()
public String toXML()
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |