File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
proxy/src/main/java/com/iluwatar Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 11package com .iluwatar ;
22
3+ /**
4+ *
5+ * Proxy (WizardTowerProxy) controls access to the
6+ * actual object (WizardTower).
7+ *
8+ */
39public class App
410{
511 public static void main ( String [] args )
Original file line number Diff line number Diff line change 11package com .iluwatar ;
22
3+ /**
4+ *
5+ * The object to be proxyed.
6+ *
7+ */
38public class WizardTower {
49
510 public void enter (Wizard wizard ) {
Original file line number Diff line number Diff line change 11package com .iluwatar ;
22
3+ /**
4+ *
5+ * The proxy controlling access to WizardTower.
6+ *
7+ */
38public class WizardTowerProxy extends WizardTower {
49
510 private static final int NUM_WIZARDS_ALLOWED = 3 ;
@@ -15,5 +20,4 @@ public void enter(Wizard wizard) {
1520 System .out .println (wizard + " is not allowed to enter!" );
1621 }
1722 }
18-
1923}
You can’t perform that action at this time.
0 commit comments