View Source

{section}
{column}

h1. Introduction

The Petals BC Gateway tooling pack for Petals CLI is a set of commands relatives to the Petals BC Gateway. The pack comes with the commands:
* {{bc-gateway.add-transport-listener}}: Add a new transport listener,
* {{bc-gateway.set-transport-listener-port}}: Modify the port of a transport listener,
* {{bc-gateway.del-transport-listener}}: Remove an existing transport listener,
* {{bc-gateway.list-transport-listener}}: List existing transport listeners of the Petals BC Gateway,
* {{bc-gateway.repropagate}}: Re-propagate endpoints to the domain clients connected on the current gateway.

{column}
{column:width=40%}
{panel:title=Table of contents}{toc}{panel}
{panel:title=Contributors}{contributors:order=name|mode=list}{panel}
{column}
{section}

h1. Installing the Petals BC Gateway tooling pack

h2. Through Debians packages

If you have installed Petals CLI using the Debian packages, we recommend you to install the Petals BC Gateway tooling pack using its own Debian package ({{petals-cli-bc-gateway}}). Otherwise, unzip the content of the ZIP archive in the directory {{$PETALS_CLI_HOME/extensions}}.

h2. Through ZIP archives

If you have installed the *full* ZIP archive, the extension should be already installed. Otherwise, unzip the content of the ZIP archive {{petals-cli-bc-gateway}} in the directory {{$PETALS_CLI_HOME/extensions}}.

h2. Installation verification

To check that the installation is correct, just get the list of available commands of your Petals CLI, you should see the command '{{bc-gateway.*}}' in the list:
{code}
> ./petals-cli.sh -c -- help
Available commands:
...
bc-gateway.repropagate
Repropagate all elected endpoints to the client domains of the BC Gateway.
connect Connect to a Petals ESB node.
...
{code}

h1. Commands

h2. Add a new transport listener

The command *{{bc-gateway.add-transport-listener}}* provides a way to configure a Petals BC Gateway to add a new transport listener.

{code}
USAGE:
bc-gateway.add-transport-listener -i <transport-listener-identifier>
[-n <component-identifier>] -p <listening-port>


DESCRIPTION:
Add a new transport listener to the given BC Gateway

OPTIONS DESCRIPTION:
-i,--identifier <transport-listener-identifier> The unique identifier
of the transport
listener to add to the
BC Gateway.
-n,--component <component-identifier> The component
identifier associated
to the BC Gateway.
-p,--port <listening-port> The listening port of
the transport listener
to add to the BC
Gateway.
{code}

The default component identifier used is: {{petals-bc-jbi-gateway}}.

h2. Modify the port of a transport listener

The command *{{bc-gateway.set-transport-listener-port}}* provides a way to configure a Petals BC Gateway to modify the port of one of its transport listener.

{tip}Modifying the port of a transport listener of a started BC Gateway will restart it, even if it is the same port, but the already established connections won't be stopped.{tip}

{code}
USAGE:
bc-gateway.set-transport-listener-port -i <transport-listener-identifier>
[-n <component-identifier>] -p <listening-port>


DESCRIPTION:
Modify the port of a transport listener of the given BC Gateway

OPTIONS DESCRIPTION:
-i,--identifier <transport-listener-identifier> The unique identifier
of the transport
listener to modify in the
BC Gateway.
-n,--component <component-identifier> The component
identifier associated
to the BC Gateway.
-p,--port <listening-port> The new listening port of
the transport listener
to modify in the BC
Gateway.
{code}

The default component identifier used is: {{petals-bc-jbi-gateway}}.

h2. Remove an existing transport listener

The command *{{bc-gateway.del-transport-listener}}* provides a way to configure a Petals BC Gateway to remove an existing transport listener.

{tip}A transport listener can't be removed if it's currently being used by deployed service units!{tip}

{code}
USAGE:
bc-gateway.del-transport-listener -i <transport-listener-identifier>
[-n <component-identifier>]


DESCRIPTION:
Remove a transport listener of the given BC Gateway

OPTIONS DESCRIPTION:
-i,--identifier <transport-listener-identifier> The unique identifier
of the transport
listener to remove from
the BC Gateway.
-n,--component <component-identifier> The component
identifier associated
to the BC Gateway.
{code}

The default component identifier used is: {{petals-bc-jbi-gateway}}.

h2. List existing transport listeners

The command *{{bc-gateway.list-transport-listener}}* provides a way to list all configured transport listeners of the given Petals BC Gateway and given criteria: transport listener identifier, listening status and/or port.

{code}
USAGE:
bc-gateway.list-transport-listener [-i <transport-listener-identifier>]
[-l <boolean>] [-n <component-identifier>] [-p <listening-port>]


DESCRIPTION:
List transport listeners of the given BC Gateway

OPTIONS DESCRIPTION:
-i,--identifier <transport-listener-identifier> The unique identifier
of the transport
listener to list.
-l,--listening <boolean> The listening status of
the transport listeners
to list.
-n,--component <component-identifier> The component
identifier associated
to the BC Gateway.
-p,--port <listening-port> The listening port of
the transport listener
to list.
{code}

The default component identifier used is: {{petals-bc-jbi-gateway}}.

h2. Refresh endpoint propagations

The command *{{bc-gateway.repropagate}}* provides a way to refresh endpoint propagations to domain clients of the current gateway.

{code}
USAGE:
bc-gateway.repropagate [-n <component-identifier>]


DESCRIPTION:
Repropagate all elected endpoints to the client domains of the BC Gateway

OPTIONS DESCRIPTION:
-n,--component <component-identifier> The component identifier
associated to the BC Gateway.
{code}

The default component identifier used is: {{petals-bc-jbi-gateway}}.