Skip to content

9주차 [DesignPattern] Proxy pattern#62

Open
ChaerinYu wants to merge 1 commit intono-study-no-future:ChaerinYufrom
ChaerinYu:proxypattern
Open

9주차 [DesignPattern] Proxy pattern#62
ChaerinYu wants to merge 1 commit intono-study-no-future:ChaerinYufrom
ChaerinYu:proxypattern

Conversation

@ChaerinYu
Copy link
Member

No description provided.

@ChaerinYu ChaerinYu added the ETC ETC label Feb 27, 2022
@ChaerinYu ChaerinYu linked an issue Feb 27, 2022 that may be closed by this pull request
Image image1 = new ProxyImage("HiRes_10MB_Photo1");
Image image2 = new ProxyImage("HiRes_10MB_Photo2");

image1.displayImage(); // loading necessary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에 image1의 선언했을 때 실제 객체가 생성되는게 아니라 displayImage()를 했을 때 생성되는 가상프록시 예제인거죠?
이미지가 들어가있지 않지만 들어간것처럼 보이는거고 진짜 이미지를 display할때 불러오는 것.. 이게 바로 Proxy..?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 ProxyImage 클래스의 displayImage() 메소드에서 RealImage 클래스 객체를 생성하여 대신 일을 수행하는 거라고 이해했습니다.

@ChaerinYu ChaerinYu added the DesignPattern DesignPattern label Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DesignPattern DesignPattern ETC ETC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ETC/DesignPattern] Proxy Pattern 프록시 패턴

3 participants