本文整理了Java中org.jivesoftware.smack.packet.Message.setProperty()
方法的一些代码示例,展示了Message.setProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setProperty()
方法的具体详情如下:
包路径:org.jivesoftware.smack.packet.Message
类名称:Message
方法名:setProperty
暂无
代码示例来源:origin: org.littleshoot/xmpp
protected Message newError(final String from, final Long tid) {
final Message error = new Message();
error.setProperty(P2PConstants.MESSAGE_TYPE,
P2PConstants.INVITE_ERROR);
if (tid != null) {
error.setProperty(P2PConstants.TRANSACTION_ID, tid);
}
error.setTo(from);
return error;
}
代码示例来源:origin: org.littleshoot/xmpp
protected Message newError(final String from, final Long tid) {
final Message error = new Message();
error.setProperty(P2PConstants.MESSAGE_TYPE,
P2PConstants.INVITE_ERROR);
if (tid != null) {
error.setProperty(P2PConstants.TRANSACTION_ID, tid);
}
error.setTo(from);
return error;
}
代码示例来源:origin: org.littleshoot/xmpp
private Message newInviteOverControlSocket(final String jid,
final byte[] offer, final KeyStorage keyStorage) {
final Message msg = new Message();
msg.setTo(jid);
log.info("Sending offer: {}", new String(offer));
final String base64Sdp =
Base64.encodeBase64URLSafeString(offer);
msg.setProperty(P2PConstants.MESSAGE_TYPE, P2PConstants.INVITE);
msg.setProperty(P2PConstants.SDP, base64Sdp);
msg.setProperty(P2PConstants.CONTROL, "true");
//final byte[] writeKey = keyStorage.getWriteKey();
//log.info("Setting client write key to: {}", writeKey);
//msg.setProperty(P2PConstants.SECRET_KEY,
// Base64.encodeBase64String(writeKey));
return msg;
}
代码示例来源:origin: org.littleshoot/xmpp
private Message newInviteOverControlSocket(final String jid,
final byte[] offer, final KeyStorage keyStorage) {
final Message msg = new Message();
msg.setTo(jid);
log.info("Sending offer: {}", new String(offer));
final String base64Sdp =
Base64.encodeBase64URLSafeString(offer);
msg.setProperty(P2PConstants.MESSAGE_TYPE, P2PConstants.INVITE);
msg.setProperty(P2PConstants.SDP, base64Sdp);
msg.setProperty(P2PConstants.CONTROL, "true");
//final byte[] writeKey = keyStorage.getWriteKey();
//log.info("Setting client write key to: {}", writeKey);
//msg.setProperty(P2PConstants.SECRET_KEY,
// Base64.encodeBase64String(writeKey));
return msg;
}
代码示例来源:origin: org.littleshoot/xmpp
private Message newInviteOk(final Long tid, final byte[] answer) {
final Message inviteOk = new Message();
if (tid != null) {
inviteOk.setProperty(P2PConstants.TRANSACTION_ID, tid.longValue());
}
inviteOk.setProperty(P2PConstants.MESSAGE_TYPE, P2PConstants.INVITE_OK);
inviteOk.setProperty(P2PConstants.SDP,
Base64.encodeBase64String(answer));
if (this.offerAnswerFactory.isAnswererPortMapped()) {
inviteOk.setProperty(P2PConstants.MAPPED_PORT,
this.offerAnswerFactory.getMappedPort());
inviteOk.setProperty(P2PConstants.PUBLIC_IP,
this.publicIp.getPublicIpAddress().getHostAddress());
}
return inviteOk;
}
代码示例来源:origin: org.littleshoot/xmpp
private Message newInviteOk(final Long tid, final byte[] answer) {
final Message inviteOk = new Message();
if (tid != null) {
inviteOk.setProperty(P2PConstants.TRANSACTION_ID, tid.longValue());
}
inviteOk.setProperty(P2PConstants.MESSAGE_TYPE, P2PConstants.INVITE_OK);
inviteOk.setProperty(P2PConstants.SDP,
Base64.encodeBase64String(answer));
if (this.offerAnswerFactory.isAnswererPortMapped()) {
inviteOk.setProperty(P2PConstants.MAPPED_PORT,
this.offerAnswerFactory.getMappedPort());
inviteOk.setProperty(P2PConstants.PUBLIC_IP,
this.publicIp.getPublicIpAddress().getHostAddress());
}
return inviteOk;
}
代码示例来源:origin: org.littleshoot/xmpp
private Message newInviteToEstablishControlSocket(final String jid,
final byte[] offer,
final OfferAnswerTransactionListener transactionListener,
final KeyStorage keyStorage) {
final long id = RandomUtils.nextLong();
transactionIdsToProcessors.put(id,
new TransactionData(transactionListener, keyStorage));
//transactionIdsToProcessors.put(id, td);
final Message msg = new Message();
msg.setTo(jid);
log.info("Sending offer: {}", new String(offer));
final String base64Sdp =
Base64.encodeBase64URLSafeString(offer);
msg.setProperty(P2PConstants.TRANSACTION_ID, id);
msg.setProperty(P2PConstants.MESSAGE_TYPE, P2PConstants.INVITE);
msg.setProperty(P2PConstants.SDP, base64Sdp);
msg.setProperty(P2PConstants.CONTROL, "true");
//msg.setProperty(P2PConstants.SECRET_KEY,
// Base64.encodeBase64String(keyStorage.getWriteKey()));
return msg;
}
代码示例来源:origin: org.littleshoot/xmpp
private Message newInviteToEstablishControlSocket(final String jid,
final byte[] offer,
final OfferAnswerTransactionListener transactionListener,
final KeyStorage keyStorage) {
final long id = RandomUtils.nextLong();
transactionIdsToProcessors.put(id,
new TransactionData(transactionListener, keyStorage));
//transactionIdsToProcessors.put(id, td);
final Message msg = new Message();
msg.setTo(jid);
log.info("Sending offer: {}", new String(offer));
final String base64Sdp =
Base64.encodeBase64URLSafeString(offer);
msg.setProperty(P2PConstants.TRANSACTION_ID, id);
msg.setProperty(P2PConstants.MESSAGE_TYPE, P2PConstants.INVITE);
msg.setProperty(P2PConstants.SDP, base64Sdp);
msg.setProperty(P2PConstants.CONTROL, "true");
//msg.setProperty(P2PConstants.SECRET_KEY,
// Base64.encodeBase64String(keyStorage.getWriteKey()));
return msg;
}
代码示例来源:origin: org.nuiton.wikitty/wikitty-api
@Override
public void sendMessage(WikittyEvent event) throws Exception {
if (propagateEvent) {
Message message = muc.createMessage();
message.setBody(event.getType().toString());
message.setProperty(PROPERTY_EVENT_NAME, event);
muc.sendMessage(message);
}
}
代码示例来源:origin: org.mobicents.resources/mobicents-slee-ra-xmpp-library
for (Iterator i=properties.keySet().iterator(); i.hasNext(); ) {
String name = (String)i.next();
message.setProperty(name, properties.get(name));
代码示例来源:origin: org.igniterealtime.smack/smack
message.setProperty(name, properties.get(name));
代码示例来源:origin: tiandawu/IotXmpp
message.setProperty(name, properties.get(name));
代码示例来源:origin: org.littleshoot/smack-xmpp-3-2-2
message.setProperty(name, properties.get(name));
代码示例来源:origin: org.apache.axis2.transport/axis2-transport-xmpp
message.setProperty(XMPPConstants.CONTENT_TYPE, HTTPConstants.MEDIA_TYPE_APPLICATION_SOAP_XML+ "; action="+ msgCtx.getSoapAction());
}else{
message.setProperty(XMPPConstants.CONTENT_TYPE, HTTPConstants.MEDIA_TYPE_TEXT_XML);
message.setProperty(XMPPConstants.IS_SERVER_SIDE, new Boolean(false));
message.setProperty(XMPPConstants.IN_REPLY_TO, xmppOutTransportInfo.getInReplyTo());
message.setProperty(XMPPConstants.SEQUENCE_ID, xmppOutTransportInfo.getSequenceID());
}else{
message.setProperty(XMPPConstants.IS_SERVER_SIDE,new Boolean(true));
message.setProperty(XMPPConstants.CONTAINS_SOAP_ENVELOPE, new Boolean(true));
message.setProperty(XMPPConstants.SERVICE_NAME, serviceName);
String action = options.getAction();
if (action == null) {
message.setProperty(XMPPConstants.ACTION, action);
key = UUID.randomUUID().toString();
xmppClientSidePacketListener.listenForResponse(key, msgCtx);
message.setProperty(XMPPConstants.SEQUENCE_ID, key);
代码示例来源:origin: apache/axis2-java
message.setProperty(XMPPConstants.CONTENT_TYPE, HTTPConstants.MEDIA_TYPE_APPLICATION_SOAP_XML+ "; action="+ msgCtx.getSoapAction());
}else{
message.setProperty(XMPPConstants.CONTENT_TYPE, HTTPConstants.MEDIA_TYPE_TEXT_XML);
message.setProperty(XMPPConstants.IS_SERVER_SIDE, new Boolean(false));
message.setProperty(XMPPConstants.IN_REPLY_TO, xmppOutTransportInfo.getInReplyTo());
message.setProperty(XMPPConstants.SEQUENCE_ID, xmppOutTransportInfo.getSequenceID());
}else{
message.setProperty(XMPPConstants.IS_SERVER_SIDE,new Boolean(true));
message.setProperty(XMPPConstants.CONTAINS_SOAP_ENVELOPE, new Boolean(true));
message.setProperty(XMPPConstants.SERVICE_NAME, serviceName);
String action = options.getAction();
if (action == null) {
message.setProperty(XMPPConstants.ACTION, action);
key = UUID.randomUUID().toString();
xmppClientSidePacketListener.listenForResponse(key, msgCtx);
message.setProperty(XMPPConstants.SEQUENCE_ID, key);
代码示例来源:origin: org.apache.axis2.transport/axis2-transport-xmpp
message.setProperty(XMPPConstants.IN_REPLY_TO, xmppOutTransportInfo.getInReplyTo());
xmppConnection = xmppOutTransportInfo.getConnectionFactory().getXmppConnection();
if(xmppConnection == null){
Chat chat = chatManager.createChat(xmppOutTransportInfo.getDestinationAccount(), null);
try{
message.setProperty(XMPPConstants.SEQUENCE_ID,
xmppOutTransportInfo.getSequenceID());
message.setBody(responseMsg);
代码示例来源:origin: apache/axis2-java
message.setProperty(XMPPConstants.IN_REPLY_TO, xmppOutTransportInfo.getInReplyTo());
xmppConnection = xmppOutTransportInfo.getConnectionFactory().getXmppConnection();
if(xmppConnection == null){
Chat chat = chatManager.createChat(xmppOutTransportInfo.getDestinationAccount(), null);
try{
message.setProperty(XMPPConstants.SEQUENCE_ID,
xmppOutTransportInfo.getSequenceID());
message.setBody(responseMsg);
代码示例来源:origin: org.mule.transports/mule-transport-xmpp
result.setProperty(propertyName, muleMessage.<Object>getOutboundProperty(propertyName));
内容来源于网络,如有侵权,请联系作者删除!