-
Notifications
You must be signed in to change notification settings - Fork 23
getPackingSlip
Jim Cowart edited this page Jan 16, 2013
·
1 revision
the postal.fedx.getPackingSlip( type [, arg1, arg2, etc. ])
method returns a federation "packingSlip" - a wrapper for your message that is specific to postal.federation
. There are four types of packing slips:
-
ping
- this is used when one postal instance is attempting to ping a remote instance, to set up federation. -
pong
- this is used when replying to another instance'sping
message -
bundle
- this is a generic wrapper that allows multiple packing slips to be transmitted as one message (primarily as an option to keep transport chatter to a minimum) -
message
- the most commonly used packingSlip. It's meant to wrap a postal message envelope before it is sent to the remote instance(s).
In addition to the type
argument, additional arguments can be passed that may be used in the packing-slip-specific handler. Currently, these are the possible method signatures:
getPackingSlip("ping")
getPackingSlip("pong", originalPingPackingSlip)
getPackingSlip("bundle", packlingSlipsArray)
getPackingSlip("message", envelope)
Note that you don't ever have to call getPackingSlip
directly (unless you are writing a federation transport plugin).