2014-08-17 09:05:37 +03:00
|
|
|
package com.iluwatar;
|
|
|
|
|
2014-08-31 10:52:37 +03:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Makes requests that are handled by the chain.
|
|
|
|
*
|
|
|
|
*/
|
2014-08-17 09:05:37 +03:00
|
|
|
public class OrcKing {
|
|
|
|
|
|
|
|
RequestHandler chain;
|
|
|
|
|
|
|
|
public OrcKing() {
|
|
|
|
buildChain();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void buildChain() {
|
|
|
|
chain = new OrcCommander(new OrcOfficer(new OrcSoldier(null)));
|
|
|
|
}
|
|
|
|
|
|
|
|
public void makeRequest(Request req) {
|
|
|
|
chain.handleRequest(req);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|