Difference between revisions of "Data Transfer Common Messaging"
(→Common Messaging) |
(→Common Messaging Interface) |
||
Line 1: | Line 1: | ||
= Common Messaging Interface = | = Common Messaging Interface = | ||
− | |||
− | |||
− | |||
The Common Messaging Interface has been implemented so that messaging can be integrated from other Components such as scheduler and agent service. | The Common Messaging Interface has been implemented so that messaging can be integrated from other Components such as scheduler and agent service. | ||
− | + | ||
== Common Messaging == | == Common Messaging == | ||
− | + | ||
=== Messages === | === Messages === | ||
<br> | <br> | ||
*TransferRequestMessage: | *TransferRequestMessage: | ||
− | This message holds information about the transfer details that | + | This message holds information about the transfer details that scheduler submits to agent service. Provided information can be input uri's, destination folder, transfer options etc. |
*TransferResponseMessage: | *TransferResponseMessage: | ||
− | On the other side the transfer response message holds details about the submitted transfer. | + | On the other side the transfer response message holds details about the submitted transfer. This message will be sent until the transfer has been completed (whatever that status will be) and the receiver is able to see the bytes that already have been transferred the status etc. |
+ | <br> | ||
+ | === Messages Queues === | ||
+ | TransfeRequest queue specified by the endpoint of the agent destination | ||
+ | TransferResponse queue | ||
<br> | <br> | ||
=== Scenario === | === Scenario === | ||
<br> | <br> | ||
+ | Just to give a initial overview of the API the following is a simple code snippet which initialize a MSGClient used both in agent and scheduler service for producing a message. | ||
+ | |||
+ | <source lang="java6"> | ||
+ | // **** Setting MSG Client **** | ||
+ | ScopeProvider.instance.set(scope.toString()); | ||
+ | try { | ||
+ | ServiceContext.getContext().setMsgClient(MSGClientFactory.getMSGClientInstance()); | ||
+ | } catch (Exception e) { | ||
+ | e.printStackTrace(); | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | For the subscription, the scheduler and agent should follow respectively the following: | ||
+ | <source lang="java6"> | ||
+ | // **** Scheduler Ssubscription **** | ||
+ | TransferResponseSubscription subscriber = new TransferResponseSubscription(sourceEndpoint); | ||
+ | subscriber.setScope(scope); | ||
+ | try { | ||
+ | subscriber.subscribe(); | ||
+ | } catch (Exception e) { | ||
+ | e.printStackTrace(); | ||
+ | } | ||
+ | |||
+ | // **** Agent Ssubscription **** | ||
+ | TransferRequestSubscription subscriber = new TransferRequestSubscription(sourceEndpoint); | ||
+ | subscriber.setScope(scope); | ||
+ | try { | ||
+ | subscriber.subscribe(); | ||
+ | } catch (Exception e) { | ||
+ | e.printStackTrace(); | ||
+ | } | ||
+ | </source> |
Revision as of 17:49, 18 March 2013
Contents
Common Messaging Interface
The Common Messaging Interface has been implemented so that messaging can be integrated from other Components such as scheduler and agent service.
Common Messaging
Messages
- TransferRequestMessage:
This message holds information about the transfer details that scheduler submits to agent service. Provided information can be input uri's, destination folder, transfer options etc.
- TransferResponseMessage:
On the other side the transfer response message holds details about the submitted transfer. This message will be sent until the transfer has been completed (whatever that status will be) and the receiver is able to see the bytes that already have been transferred the status etc.
Messages Queues
TransfeRequest queue specified by the endpoint of the agent destination
TransferResponse queue
Scenario
Just to give a initial overview of the API the following is a simple code snippet which initialize a MSGClient used both in agent and scheduler service for producing a message.
Invalid language.
You need to specify a language like this: <source lang="html4strict">...</source>
Supported languages for syntax highlighting:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic
// **** Setting MSG Client **** ScopeProvider.instance.set(scope.toString()); try { ServiceContext.getContext().setMsgClient(MSGClientFactory.getMSGClientInstance()); } catch (Exception e) { e.printStackTrace(); }
For the subscription, the scheduler and agent should follow respectively the following:
Invalid language.
You need to specify a language like this: <source lang="html4strict">...</source>
Supported languages for syntax highlighting:
4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic
// **** Scheduler Ssubscription **** TransferResponseSubscription subscriber = new TransferResponseSubscription(sourceEndpoint); subscriber.setScope(scope); try { subscriber.subscribe(); } catch (Exception e) { e.printStackTrace(); } // **** Agent Ssubscription **** TransferRequestSubscription subscriber = new TransferRequestSubscription(sourceEndpoint); subscriber.setScope(scope); try { subscriber.subscribe(); } catch (Exception e) { e.printStackTrace(); }