istomp爱情是什么么

DigiTech Stomp Shop (iPhone / iPad)的文字 · · · · · ·
获取这个应用
&&&&&&&&&&&&
手机扫描二维码安装
谁用这个应用
&&&&&&&&&&&&谁知道老文头英语儿歌中《Dinosaur Stomp》的歌词集中文翻译!谢谢_百度宝宝知道StompClient的包装类
时间: 15:10:01
&&&& 阅读:180
&&&& 评论:
&&&& 收藏:0
标签:为了简化MQ调用,写了个StompClient的包装类,可以供需要的参考:
unit FStompC
SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs,
StompClient,StompT
TMQLogEvent = procedure (log: String) of object;
TMQMessageEvent = procedure (msgTime: TDateT msgBody: String) of object;
TMQStompClient = class(TInterfacedObject, IStompClientListener)
FOnMQLogEvent: TMQLogE
FOnMQMsgEvent: TMQMessageE
FTR: string;
stomp: IStompC
th: TStompClientL
constructor C
destructor D override;
procedure AbortTransaction(tr: String);
procedure BeginTransaction(tr: String);
procedure CommitTransaction(tr: String);
function ConnectToMQ(Host: S Port: Integer = 61613; ClientID: String
= ‘Garfield‘; User: String = ‘‘; Password: String = ‘‘): B
procedure DisconnectMQ;
procedure DurableSubscribe(subName, clientID: String); overload;
procedure OnMessage(StompClient: IStompC StompFrame: IStompF var
StompListening: Boolean);
procedure OnStopListen(StompClient: IStompClient);
procedure SendPub(subName, body: S Persistent: Boolean = True);
procedure Subscribe(subName: String); overload;
procedure Unsubscribe(subName: String);
property OnMQLogEvent: TMQLogEvent read FOnMQLogEvent write FOnMQLogE
property OnMQMsgEvent: TMQMessageEvent read FOnMQMsgEvent write
implementation
{ TMQStompClient }
******************************** TMQStompClient ********************************
constructor TMQStompClient.C
stomp := TStompClient.C
destructor TMQStompClient.D
if assigned(th) then
//By garfield
//FreeAndNil(th);
stomp := nil;
procedure TMQStompClient.AbortTransaction(tr: String);
stomp.AbortTransaction(tr);
FTR:=‘‘;
procedure TMQStompClient.BeginTransaction(tr: String);
stomp.BeginTransaction(tr);
procedure mitTransaction(tr: String);
mitTransaction(tr);
FTR:=‘‘;
function TMQStompClient.ConnectToMQ(Host: S Port: Integer = 61613;
ClientID: String = ‘Garfield‘; User: String = ‘‘; Password: String = ‘‘):
stomp.SetUserName(User);
stomp.SetPassword(Password);
stomp.Connect(Host, Port, ClientID, TStompAcceptProtocol.STOMP_Version_1_0);
th := TStompClientListener.Create(stomp, Self);
if Assigned(FOnMQLogEvent) then
FOnMQLogEvent(‘连接消息服务器成功!‘);
on E: Exception do
if Assigned(FOnMQLogEvent) then
FOnMQLogEvent(‘连接消息服务器失败!错误信息:‘+E.ClassName + sLineBreak + E.Message);
procedure TMQStompClient.DisconnectMQ;
//By garfield
//FreeAndNil(th);
if Assigned(FOnMQLogEvent) then
FOnMQLogEvent(‘与消息服务器成功断开!‘);
procedure TMQStompClient.DurableSubscribe(subName, clientID: String);
stomp.Subscribe(subName, amAuto,
StompUtils.NewHeaders.Add(TStompHeaders.NewDurableSubscriptionHeader(clientID)));
if Assigned(FOnMQLogEvent) then
FOnMQLogEvent(‘订阅持久化主题成功:‘+subName+‘
clientID:‘+clientID);
procedure TMQStompClient.OnMessage(StompClient: IStompC StompFrame:
IStompF var StompListening: Boolean);
TThread.Synchronize(nil,
if StompFrame.GetBody.Length&&0 then
if Assigned(FOnMQMsgEvent) then
FOnMQMsgEvent(Now,StompFrame.GetBody);
procedure TMQStompClient.OnStopListen(StompClient: IStompClient);
if Assigned(FOnMQLogEvent) then
FOnMQLogEvent(‘监听停止‘);
procedure TMQStompClient.SendPub(subName, body: S Persistent: Boolean =
h: IStompH
h := StompUtils.NewH
if Persistent then
h.Add(TStompHeaders.NewPersistentHeader(true));
if FTR && ‘‘ then
stomp.Send(subName, body, FTR, h)
stomp.Send(subName, body, h);
procedure TMQStompClient.Subscribe(subName: String);
stomp.Subscribe(subName);
if Assigned(FOnMQLogEvent) then
FOnMQLogEvent(‘订阅主题成功:‘+subName);
procedure TMQStompClient.Unsubscribe(subName: String);
stomp.Unsubscribe(subName);
调用起来就比较简单了:
unit FfrmM
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs,FStompClient, Vcl.StdCtrls, Vcl.ExtCtrls,
TfrmMain = class(TForm)
memLog: TM
RzPanel1: TRzP
btnConnect: TB
btnDisconnect: TB
btnSub: TB
chkDurable: TCheckB
edtSub: TLabeledE
edtHost: TLabeledE
edtPort: TLabeledE
edtClientID: TLabeledE
btnSend: TB
edtContent: TLabeledE
procedure FormCreate(Sender: TObject);
procedure btnConnectClick(Sender: TObject);
procedure btnSubClick(Sender: TObject);
procedure btnSendClick(Sender: TObject);
{ Private declarations }
aClient:TMQStompC
{ Public declarations }
procedure OnLog(log: String);
procedure OnMsg(msgTime: TDateT msgBody: String);
frmMain: TfrmM
implementation
{$R *.dfm}
procedure TfrmMain.btnConnectClick(Sender: TObject);
aClient.ConnectToMQ(edtHost.Text,StrToInt(edtPort.Text));
procedure TfrmMain.btnSendClick(Sender: TObject);
aClient.SendPub(edtSub.Text,edtContent.Text,chkDurable.Checked);
procedure TfrmMain.btnSubClick(Sender: TObject);
if chkDurable.Checked then
aClient.DurableSubscribe(edtSub.Text,edtClientID.Text)
aClient.Subscribe(edtSub.Text);
procedure TfrmMain.FormCreate(Sender: TObject);
aClient:=TMQStompClient.C
aClient.OnMQLogEvent:=OnL
aClient.OnMQMsgEvent:=OnM
procedure TfrmMain.OnLog(log: String);
memLog.Lines.Add(log);
procedure TfrmMain.OnMsg(msgTime: TDateT msgBody: String);
memLog.Lines.Add(‘收到消息:‘+FormatDateTime(‘yyyy-mm-dd hh:mm:ss‘,msgTime)+‘
‘+msgBody);
窗口定义:
object frmMain: TfrmMain
Caption = ‘StompClientTest‘
ClientHeight = 324
ClientWidth = 384
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = ‘Tahoma‘
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object memLog: TMemo
Width = 384
Height = 160
Align = alClient
ScrollBars = ssBoth
TabOrder = 0
object RzPanel1: TRzPanel
Width = 384
Height = 164
Align = alBottom
TabOrder = 1
object btnConnect: TButton
Left = 261
Width = 75
Height = 25
Caption = #36830#25509
TabOrder = 0
OnClick = btnConnectClick
object btnDisconnect: TButton
Left = 261
Width = 75
Height = 25
Caption = #26029#24320
TabOrder = 1
object btnSub: TButton
Left = 261
Width = 75
Height = 25
Caption = #35746#38405
TabOrder = 2
OnClick = btnSubClick
object chkDurable: TCheckBox
Left = 272
Width = 64
Height = 17
Caption = #25345#20037#21270
TabOrder = 3
object edtSub: TLabeledEdit
Width = 160
Height = 21
EditLabel.Width = 24
EditLabel.Height = 13
EditLabel.Caption = #20027#39064
LabelPosition = lpLeft
TabOrder = 4
Text = ‘/topic/hello‘
object edtHost: TLabeledEdit
Width = 160
Height = 21
EditLabel.Width = 22
EditLabel.Height = 13
EditLabel.Caption = ‘Host‘
LabelPosition = lpLeft
TabOrder = 5
Text = ‘localhost‘
object edtPort: TLabeledEdit
Width = 160
Height = 21
EditLabel.Width = 20
EditLabel.Height = 13
EditLabel.Caption = ‘Port‘
LabelPosition = lpLeft
TabOrder = 6
Text = ‘61613‘
object edtClientID: TLabeledEdit
Width = 160
Height = 21
EditLabel.Width = 38
EditLabel.Height = 13
EditLabel.Caption = ‘ClientID‘
LabelPosition = lpLeft
TabOrder = 7
Text = ‘garfield‘
object btnSend: TButton
Left = 261
Width = 75
Height = 25
Caption = #21457#36865
TabOrder = 8
OnClick = btnSendClick
object edtContent: TLabeledEdit
Width = 160
Height = 21
EditLabel.Width = 24
EditLabel.Height = 13
EditLabel.Caption = #20869#23481
LabelPosition = lpLeft
TabOrder = 9
Text = #20320#22909#65292#27426#36814#20351#29992
&&国之画&&&& &&&&chrome插件&&
版权所有 京ICP备号-2
迷上了代码!当前位置: &
stomp中文是什么意思
音标:[ stɔmp ]&&发音:&&
中文翻译短语和例子stomp1vt.,vi.=stamp 〔尤指踏伤、踩死〕。n.〔美国〕1.节奏活泼、拍子强烈的爵士乐曲调。2.上述乐曲的舞蹈。3.跺脚,重踩。n.,vt.=stump2.&&&&贫民踩踏&&&&跳跃踩踏&&&&踩蘑菇&&&&跳板式踩踏&&&&华山绝顶; 腾云驾雾&&&&街舞少年; 舞动激情&&&&战争践踏&&&&跳水式双足踩踏&&&&红色大厅&&&&破铜烂铁打着玩&&&&印度螫蝇; 尤螫蝇&&&&华南螫蝇&&&&厩螫蝇&&&&斯通珀托伦&&&&鲍氏螫蝇&&&&施通普费&&&&螫蝇属
关注微信公众号:chachacidian,即可查询单词
例句与用法He looked funny stomping round the dance floor .他在舞池里跺着舞步,样子很可笑。" stomp " can suggest clumsy and noisy walking or dancing .“stomp”可指行走或跳舞时笨拙或发出响声。Ben stomped the snow from his boots and followed the others into the house .本跺着靴子上的雪,跟着其他人进了屋。" stump " and " stomp " can both suggest making a noise while walking in order to show anger .“Stump”和“stomp”二者都表示走路时发出声音,表示气愤。" stump , stomp , plod , trudge tramp " all indicate styles of walking with heavy steps .“stump,stomp,plod,trudge,tramp”均指落脚很重的步行方式。It went through cedar key and flattered it and came on back through it and stomped the ruins .它横扫松礁,把它束为平地,然后转过头来从礁上砍过,践踏了那些废墟。Now the surging men, each looking exactly like the other, parted and poured around me, jarring the earth, their feet stomping in unison .现在蜂拥的人群每个人看起来都和另一个一模一样从我身旁走过,过去一批又拥来一批,步伐整齐,震动着大地。He looked funny stomping round the dance floor他在舞池里跺著舞步,样子很可笑I and you go to france , and you go to stomp ! i你去法国,你去看i跺脚舞i ! I - and we saw stomp . - i love stomp . i-我们看了i跺脚舞i -我喜欢i跺脚舞i 更多例句:&&1&&&&&&&&&&
英文解释a dance involving a rhythmical stamping step "The men stomped through the snow in their heavy boots"同义词:, ,
相邻词汇热门词汇
stomp的中文翻译,stomp是什么意思,怎么用汉语翻译stomp,stomp的中文意思,,,发音,例句,用法和解释由查查在线词典提供,版权所有违者必究。
&&&&&&&&&&&&&&&&
Copyright &
(京ICP备号)
All rights reserved403 Forbidden
403 Forbidden
You don't have permission to access the URL on this server. Sorry for the inconvenience.
Please report this message and include the following information to us.
Thank you very much!
/user//page2.html
iz23ac8czonz
Powered by Tengine

我要回帖

更多关于 爱情是什么 的文章

 

随机推荐