资源简介

代码片段和文件信息
// Message.java
// ------------------------------------------------------------------
//
// Copyright (c) 2006-2010 Dino Chiesa.
// All rights reserved.
//
// This code module is part of MsmqJava a JNI library that provides
// access to MSMQ for Java on Windows.
//
// ------------------------------------------------------------------
//
// This code is licensed under the Microsoft Public License.
// See the file License.txt for the license details.
// More info on: http://dotnetzip.codeplex.com
//
// ------------------------------------------------------------------
//
// last saved (in emacs):
// Time-stamp: <2010-March-28 15:17:56>
//
// ------------------------------------------------------------------
//
// This module represents a Message object.
//
// ------------------------------------------------------------------
package ionic.Msmq;
/**
* The Message class models a message that is sent to or receive from an
* MSMQ queue. It exposes several properties that are known to MSMQ
* including the message label the message correlationId and the
* message body.
*
* The maximum size for an MSMQ 4.0 message is slightly less than 4
* MB. If you try to send a message that exceeds the maximum size you
* will receive a MessageQueueException with hr =
* MQ_ERROR_INSUFFICIENT_RESOURCES (0xC00E0027).
*
*/
public class Message {
private static String _encoding = “UTF-16LE“;
private static String _utf8 = “UTF-8“;
byte[] _messageBody ;
String _label ;
byte[] _correlationId ; // up to PROPID_M_CORRELATIONID_SIZE bytes
boolean _highPriority;
/**
* Sets the message body as a string.
*
* The string will be encoded as UTF-16LE with no byte-order-mark.
* This information may be useful if you use different libraries on the
* the receiving and sending side.
*
* @param value the string to use for the Message body
* @see #setBody(byte[])
*/
public void setBodyAsString(String value)
throws java.io.UnsupportedEncodingException
{ _messageBody= value.getBytes(_encoding); }
/**
* Gets the message body as a string.
*
* The string will be decoded as UTF-16LE with no byte-order-mark.
* This is mostly useful after receiving a message.
*
* If the message body is not a legal UTF-16LE bytestream then this
* method will return a rubbish string.
*
* @return the message body as a string.
* @see #getBody()
*/
public String getBodyAsString()
throws java.io.UnsupportedEncodingException
{ return new String(_messageBody _encoding); }
/**
* Sets the correlation Id on the message.
*
* MSMQ specifies that the ID should be a byte array of 20 bytes
* in length. But callers can use this convenience method to use a
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-04-19 15:11 TestMSMQ\
文件 293 2019-04-19 15:11 TestMSMQ\.classpath
文件 384 2019-04-19 15:11 TestMSMQ\.project
文件 16896 2019-04-19 15:11 TestMSMQ\MsmqJava.dll
文件 16896 2019-04-19 15:11 TestMSMQ\MsmqJava64.dll
目录 0 2019-04-19 15:11 TestMSMQ\bin\
目录 0 2019-04-19 15:11 TestMSMQ\bin\ionic\
目录 0 2019-04-19 15:11 TestMSMQ\bin\ionic\Msmq\
文件 2819 2019-04-19 15:11 TestMSMQ\bin\ionic\Msmq\Message.class
文件 2170 2019-04-19 15:11 TestMSMQ\bin\ionic\Msmq\MessageQueueException.class
文件 1296 2019-04-19 15:11 TestMSMQ\bin\ionic\Msmq\Queue$Access.class
文件 5609 2019-04-19 15:11 TestMSMQ\bin\ionic\Msmq\Queue.class
文件 1287 2019-04-19 15:11 TestMSMQ\bin\ionic\Msmq\TransactionType.class
目录 0 2019-04-19 15:11 TestMSMQ\bin\test\
文件 1469 2019-04-19 15:11 TestMSMQ\bin\test\SimpleReceiveMSMQ.class
文件 1575 2019-04-19 15:11 TestMSMQ\bin\test\SimpleSendMSMQ.class
目录 0 2019-04-19 15:11 TestMSMQ\lib\
文件 6198 2019-04-19 15:11 TestMSMQ\lib\MsmqJava.jar
文件 14336 2019-04-19 15:11 TestMSMQ\lib\MsmqJava32.dll
文件 16896 2019-04-19 15:11 TestMSMQ\lib\MsmqJava64.dll
文件 14674 2019-04-19 15:11 TestMSMQ\lib\MsmqJavaModify.jar
目录 0 2019-04-19 15:11 TestMSMQ\src\
目录 0 2019-04-19 15:11 TestMSMQ\src\ionic\
目录 0 2019-04-19 15:11 TestMSMQ\src\ionic\Msmq\
文件 11249 2019-04-19 15:11 TestMSMQ\src\ionic\Msmq\Message.java
文件 3631 2019-04-19 15:11 TestMSMQ\src\ionic\Msmq\MessageQueueException.java
文件 13432 2019-04-19 15:11 TestMSMQ\src\ionic\Msmq\Queue.java
文件 296 2019-04-19 15:11 TestMSMQ\src\ionic\Msmq\TransactionType.java
目录 0 2019-04-19 15:11 TestMSMQ\src\test\
文件 1140 2019-04-19 15:11 TestMSMQ\src\test\SimpleReceiveMSMQ.java
文件 1456 2019-04-19 15:11 TestMSMQ\src\test\SimpleSendMSMQ.java
............此处省略0个文件信息
- 上一篇:java语言与面向对象程序设计课后习题答案
- 下一篇:JSP开发的网络书店以及论文
相关资源
- 微博系统(Java源码,servlet+jsp),适
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
评论
共有 条评论