answersLogoWhite

0

Requires Version: 3.4.3Note: This document describes how to run the example with Unix. For Windows instructions, see Mock site example for windows.

The Mock Site Example shows the basics of using an object of the Site type, which allows you to dispatch commands to all Service resources organized within the Site.

This example defines two Service objects and groups them beneath one Site object. Commands executed on the Site object are automatically dispatched down to the Services in accordance to their ranking. The ranking is determined by the startuprankproperty, which is simply a number which orders the Services relative to each other, and is used by the Site commands to determine the order in which the resources should be used. By default for most dispatched commands, ranks are sorted in ascending order except for the Stop command which sorts startup rank values in descending order.

The Service lifecycle commands (see the Service Concepts document for more information) are: Start,Stop, and Status. Each of these commands is also defined in the Site type as a Dispatch command. When you call one of these commands on a Site object, it iterates over each of its Service child dependencies and sends the same command to each Service, in the order determined by the startuprank. This makes it easy to control an entire set of Services using a single command sent to the Site.

The Site Type also has a command named dispatchCmd. You can use this command to send any subcommand to the entire set of Services within the Site. You may have Service resources which have other special-purpose commands that the Site doesn't know about, and you can relay those using the dispatchCmd command in the same way that the Start,Stop, and Status lifecycle commands work automatically.

This Example shows you how to do the following things:

  1. Use the Start,Stop, and Status lifecycle commands from a Site, where the commands will be dispatched to the Services
  2. Use the dispatchCmd command to dynamically dispatch any named command to the Services for the Site.
  3. Use the project.xml resource model format to define a Site object and its related Services

The Example does not define any actual implementation for the lifecycle command scripts. It merely demonstrates how to use the Site to dispatch commands to the Site's Service resources. (For an example on how to implement the lifecycle commands for a Service, see the Mock Unix Service Example or the Windows service example.)

The diagram below describes two Services (mock1 and mock2) grouped within one Site (mock). Notice also each Service resource has its own startuprank value. mock1 has a startuprank of 1, and mock2 has a startuprank of 2:

Site commands normally execute commands in ascending startup rank order. Below you can see "mock1" is first to run "Start" and after that completes, "mock2" runs Start:

The Stop command executes commands in descending startup rank order:

This time "mock2" runs Stop first and once it completes, "mock1" runs Stop.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Who is artist Barbra Mock?

If you mean BARBARA Mock, she is an American painter. You will find a biography by clicking the link below. On that site there is a clickable 'view collection' which shows you hundreds of her works.


What were the experiences of the German people?

well what they they had to eat was mock everything really: mock goose, mock ham and even mock bread


What does mock-up?

mock means dan


What does the last name mock mean?

mock


When did George Mock die?

George Mock died in 2001.


What is the birth name of Alice Mock?

Alice Mock's birth name is Alice Dorothy Mock.


What is a hink pink for fake timepiece?

mock clock, schlock clock


Which is the best site for SSC GD online mock tests?

When I started my preparation for SSC CGL, I wasn’t aware of the fact that a mock test series can play a crucial role in your selection in any government job. But then after understanding its importance, I took SSC MOCK's mock tests which is really beneficial for me.


What do you all it when you ridicule another person?

to mock


What does the word mocking mean?

To mock means 'to make fun of' and "Mock" is used to mean practice or pretend, as in "Mock Exams", a "Mock Debate", a "Mock Trial", things students could do in a school in preparation, perhaps, for the real thing.


Which website is the finest for taking SSC CHSL online practise exam?

Choose SSC MOCK for the SSC CHSL mains. I sincerely endorse them and do not engage in any form of advertising. They provide the best mocks in my opinion. Additionally, there will soon be CGL mock exams.


What does 'mock-friendly' mean?

mock friendly - pretending to be friendly