public class JinglePacketFactory
extends java.lang.Object
JingleIQ
instances for various situations.Constructor and Description |
---|
JinglePacketFactory() |
Modifier and Type | Method and Description |
---|---|
static JingleIQ |
createBusy(java.lang.String from,
java.lang.String to,
java.lang.String sid)
Creates a
JingleIQ session-terminate packet carrying a
Reason.BUSY payload. |
static JingleIQ |
createBye(java.lang.String from,
java.lang.String to,
java.lang.String sid)
Creates a
JingleIQ session-terminate packet that is
meant to terminate an on-going, well established session (similar to a SIP
BYE request). |
static JingleIQ |
createCancel(java.lang.String from,
java.lang.String to,
java.lang.String sid)
Creates a
JingleIQ session-terminate packet that is
meant to terminate a not yet established session. |
static JingleIQ |
createContentAccept(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.lang.Iterable<ContentPacketExtension> contentList)
Creates a new
JingleIQ with the content-accept action. |
static JingleIQ |
createContentAdd(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.util.List<ContentPacketExtension> contentList)
Creates a new
JingleIQ with the content-add action. |
static JingleIQ |
createContentModify(java.lang.String from,
java.lang.String to,
java.lang.String sid,
ContentPacketExtension content)
Creates a new
JingleIQ with the content-modify action. |
static JingleIQ |
createContentReject(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.lang.Iterable<ContentPacketExtension> contentList)
Creates a new
JingleIQ with the content-reject action. |
static JingleIQ |
createContentRemove(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.lang.Iterable<ContentPacketExtension> contentList)
Creates a new
JingleIQ with the content-remove action. |
static JingleIQ |
createDescriptionInfo(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.lang.Iterable<ContentPacketExtension> contentList)
Creates a
JingleIQ description-info packet with the
specified from, to, sid, and content. |
static JingleIQ |
createRinging(JingleIQ sessionInitiate)
Creates a
JingleIQ session-info packet carrying a
ringing payload. |
static JingleIQ |
createSessionAccept(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.lang.Iterable<ContentPacketExtension> contentList)
Creates a
JingleIQ session-accept packet with the
specified from, to, sid, and content. |
static JingleIQ |
createSessionInfo(java.lang.String from,
java.lang.String to,
java.lang.String sid)
Creates a
JingleIQ session-info packet carrying a
the specified payload type. |
static JingleIQ |
createSessionInfo(java.lang.String from,
java.lang.String to,
java.lang.String sid,
SessionInfoType type)
Creates a
JingleIQ session-info packet carrying a
the specified payload type. |
static JingleIQ |
createSessionInitiate(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.util.List<ContentPacketExtension> contentList)
Creates a new
JingleIQ with the session-initiate action. |
static JingleIQ |
createSessionTerminate(java.lang.String from,
java.lang.String to,
java.lang.String sid,
Reason reason,
java.lang.String reasonText)
Creates a
JingleIQ session-terminate packet with the
specified src, dst, sid, and reason. |
static JingleIQ |
createTransportInfo(java.lang.String from,
java.lang.String to,
java.lang.String sid,
java.lang.Iterable<ContentPacketExtension> contentList)
Creates a
JingleIQ transport-info packet with the
specified from, to, sid, and
contentList. |
public static JingleIQ createRinging(JingleIQ sessionInitiate)
JingleIQ
session-info packet carrying a
ringing payload.public static JingleIQ createSessionInfo(java.lang.String from, java.lang.String to, java.lang.String sid)
JingleIQ
session-info packet carrying a
the specified payload type.from
- our full jidto
- their full jidsid
- the ID of the Jingle session this IQ will belong to.JingleIQ
session-info packet carrying a
the specified payload type.public static JingleIQ createSessionInfo(java.lang.String from, java.lang.String to, java.lang.String sid, SessionInfoType type)
JingleIQ
session-info packet carrying a
the specified payload type.from
- our full jidto
- their full jidsid
- the ID of the Jingle session this IQ will belong to.type
- the exact type (e.g. ringing, hold, mute) of the session
info IQ.JingleIQ
session-info packet carrying a
the specified payload type.public static JingleIQ createBusy(java.lang.String from, java.lang.String to, java.lang.String sid)
JingleIQ
session-terminate packet carrying a
Reason.BUSY
payload.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.JingleIQ
session-terminate packet.public static JingleIQ createBye(java.lang.String from, java.lang.String to, java.lang.String sid)
JingleIQ
session-terminate packet that is
meant to terminate an on-going, well established session (similar to a SIP
BYE request).from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.JingleIQ
session-terminate packet
.public static JingleIQ createCancel(java.lang.String from, java.lang.String to, java.lang.String sid)
JingleIQ
session-terminate packet that is
meant to terminate a not yet established session.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.JingleIQ
session-terminate packet
.public static JingleIQ createSessionTerminate(java.lang.String from, java.lang.String to, java.lang.String sid, Reason reason, java.lang.String reasonText)
JingleIQ
session-terminate packet with the
specified src, dst, sid, and reason.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.reason
- the reason for the terminationreasonText
- a human readable reason for the termination or
null for none.JingleIQ
session-terminate
packet.
.public static JingleIQ createSessionAccept(java.lang.String from, java.lang.String to, java.lang.String sid, java.lang.Iterable<ContentPacketExtension> contentList)
JingleIQ
session-accept packet with the
specified from, to, sid, and content.
Given our role in a conversation, we would assume that the from
value should also be used for the value of the Jingle responder.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media and transport
descriptions.JingleIQ
session-accept
packet.public static JingleIQ createDescriptionInfo(java.lang.String from, java.lang.String to, java.lang.String sid, java.lang.Iterable<ContentPacketExtension> contentList)
JingleIQ
description-info packet with the
specified from, to, sid, and content.
Given our role in a conversation, we would assume that the from
value should also be used for the value of the Jingle responder.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media and transport
descriptions.JingleIQ
description-info
packet.public static JingleIQ createTransportInfo(java.lang.String from, java.lang.String to, java.lang.String sid, java.lang.Iterable<ContentPacketExtension> contentList)
JingleIQ
transport-info packet with the
specified from, to, sid, and
contentList.
Given our role in a conversation, we would assume that the from
value should also be used for the value of the Jingle responder.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media transport
descriptions.JingleIQ
transport-info
packet.public static JingleIQ createSessionInitiate(java.lang.String from, java.lang.String to, java.lang.String sid, java.util.List<ContentPacketExtension> contentList)
JingleIQ
with the session-initiate action.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media and transport
descriptions.JingleIQ
session-initiate
packet.public static JingleIQ createContentAdd(java.lang.String from, java.lang.String to, java.lang.String sid, java.util.List<ContentPacketExtension> contentList)
JingleIQ
with the content-add action.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media and transport
descriptions.JingleIQ
content-add
packet.public static JingleIQ createContentAccept(java.lang.String from, java.lang.String to, java.lang.String sid, java.lang.Iterable<ContentPacketExtension> contentList)
JingleIQ
with the content-accept action.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media and transport
descriptions.JingleIQ
content-accept
packet.public static JingleIQ createContentReject(java.lang.String from, java.lang.String to, java.lang.String sid, java.lang.Iterable<ContentPacketExtension> contentList)
JingleIQ
with the content-reject action.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media and transport
descriptions.JingleIQ
content-reject
packet.public static JingleIQ createContentModify(java.lang.String from, java.lang.String to, java.lang.String sid, ContentPacketExtension content)
JingleIQ
with the content-modify action.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.content
- the content element containing media and transport
description.JingleIQ
content-modify
packet.public static JingleIQ createContentRemove(java.lang.String from, java.lang.String to, java.lang.String sid, java.lang.Iterable<ContentPacketExtension> contentList)
JingleIQ
with the content-remove action.from
- our JIDto
- the destination JIDsid
- the ID of the Jingle session that this message will be
terminating.contentList
- the content elements containing media and transport
descriptions.JingleIQ
content-remove
packet.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.