introduction Spring BlazeDs Integration

1,789 views

Published on

2009-12-04일자 스터디 자료

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,789
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

introduction Spring BlazeDs Integration

  1. 1. Spring BlazeDS Intergration 소개 <ul><li>윤성한 </li></ul><ul><li>[email_address] </li></ul>Flex Study Group : http://cafe.naver.com/flexstudygroup.cafe Spring Flex Study
  2. 2. Agenda <ul><li>Spring Flex 를 이용하여 Remote Object 를 호출 할 수 있다 . </li></ul><ul><li>Message 기반의 Polling 을 구현 할 수 있다 . </li></ul><ul><li>Spring Security 를 이용하여 Remote Object 에 접근 제한을 적용할수 있다 . </li></ul>
  3. 3. Agenda <ul><li>관련 용어 </li></ul><ul><li>Understanding about Remote Process </li></ul><ul><li>Mapping Flex Client </li></ul><ul><li>Mapping Servlet </li></ul><ul><li>Mapping Spring BlazeDS Integration </li></ul><ul><li>Mapping BlazeDS </li></ul><ul><li>Testing Demo </li></ul><ul><li>Polling Message </li></ul><ul><li>Security </li></ul><ul><li>Extending Spring Flex </li></ul>
  4. 4. 1. 관련 용어 <ul><li>Channel </li></ul><ul><li>EndPoint </li></ul><ul><li>Polling </li></ul><ul><li>MessageBroker </li></ul><ul><li>AMF </li></ul><ul><li>RemotingDestination </li></ul>Action Message Format or AMF is a binary format based loosely on the Simple Object Access Protocol (SOAP). It is used primarily to exchange data between an Adobe Flash application and a database, using a remote procedure call.
  5. 5. 2. Understanding about Remote Process 클라이언트 서버
  6. 6. 2. Understanding about Remote Process 클라이언트 서버
  7. 7. 2. Understanding about Remote Process 클라이언트 서버
  8. 8. 2. Understanding about Remote Process 클라이언트 서버
  9. 9. 2. Understanding about Remote Process 클라이언트 서버 1 2 3 AMF (Action Message Format)
  10. 10. 2. Understanding about Remote Process 클라이언트 서버 1 2 3 web.xml webmvc-config.xml service-config.xml example.mxml
  11. 11. 2. Understanding about Remote Process web.xml webmvc-config.xml service-config.xml example.mxml
  12. 12. 2. Understanding about Remote Process web.xml webmvc-config.xml service-config.xml example.mxml
  13. 13. 2. Understanding about Remote Process web.xml webmvc-config.xml service-config.xml example.mxml 1) 채널을 확보한다 . 2) 원격 Method 를 호출한다 . 3) 결과를 보여준다 . <ul><li>채널을 열고 대기한다 . </li></ul><ul><li>요청을 Mapping 한다 . </li></ul><ul><li>Spring 객체를 실행한다 . </li></ul><ul><li>결과를 보내준다 . </li></ul>
  14. 14. 3. Mapping Flex Client example.mxml <mx:AMFChannel id=&quot; myamf &quot; uri=&quot; /example-flex/app/remote/amf &quot; /> <mx:ChannelSet id=&quot; channelSet &quot; channels=&quot; { [myamf] } &quot; /> <mx:RemoteObject id=&quot; accountService &quot; destination=&quot; accountService &quot; channelSet=&quot; { channelSet } &quot; /> <mx:Button label=&quot; Call-polling1 &quot; click=&quot; accountService.findAllAccounts() &quot; /> <mx:DataGrid dataProvider =&quot; { accountService.findAllAccounts.lastResult } &quot; width=&quot; 100% &quot; height=&quot; 100% &quot; />
  15. 15. 4. Mapping Servlet web.xml < servlet > < servlet-name > example-flex </ servlet-name > < servlet-class > org.springframework.web.servlet. DispatcherServlet </ servlet-class > < init-param > < param-name > contextConfigLocation </ param-name > < param-value > /WEB-INF/config/webmvc-config.xml </ param-value > </ init-param > </ servlet > < servlet-mapping > < servlet-name > example-flex </ servlet-name > < url-pattern > /app/* </ url-pattern > </ servlet-mapping >
  16. 16. 5. Mapping Spring BlazeDS Intergration webmvc-config.xml < flex:message-broker />
  17. 17. 6. Mapping BlazeDS service-config.xml < channel -definition id = &quot;public-amf&quot; class = &quot;mx.messaging.channels.AMFChannel&quot; > < endpoint url = &quot; http://{server.name}:{server.port}/{context.root}/app/remote/public &quot; class = &quot;flex.messaging.endpoints.AMFEndpoint&quot; /> </ channel-definition >
  18. 18. 6. Mapping BlazeDS POJOs @Service @RemotingDestination( &quot;accountService&quot; ) public class AccountServiceImpl implements AccountService { @RemotingExclude public Account findAccountsByName(Long id) { return Account. findAccount(id); } @RemotingInclude public List<Account> findAllAccounts () { return Account. findAllAccounts(); } }
  19. 19. 7. Testing Demo <ul><li>Simple Demo </li></ul><ul><li>Event Demo </li></ul><ul><li>Polling Demo </li></ul><ul><li>Security Demo </li></ul><ul><li>Spring Demo Project 생성 </li></ul><ul><li>Flex Demo Project 생성 </li></ul><ul><li>기본 채널 연동 테스트 </li></ul>
  20. 20. 8. Polling Message < mx:ChannelSet id=&quot; channelSet &quot; > <mx:AMFChannel uri=“ /app/remote/pollinglong &quot; /> <mx:AMFChannel uri=“ /app/remote/polling &quot; /> < /mx:ChannelSet > < mx:Producer id=&quot; producer &quot; destination=&quot; chat &quot; channelSet=&quot; { channelSet } &quot; /> < mx:Consumer id=&quot; consumer &quot; destination=&quot; chat &quot; channelSet=&quot; { channelSet } &quot; message=&quot;messageHandler(event.message)&quot; />
  21. 21. 9. Security <flex:secured {access} />, @Secured
  22. 22. 10. Extending Spring Flex <ul><li>Extended MessageBroker </li></ul><ul><li>( org.springframework.flex.config.MessageBrokerConfigProcessor ) </li></ul><ul><li>Message Interceptors </li></ul><ul><li>(org.springframework.flex.core.MessageInterceptor) </li></ul><ul><li>Custom Service Adaptoers </li></ul><ul><li>(org.springframework.flex.core.ManageableComponentFactoryBean) </li></ul>
  23. 23. Q&A Flex Study Group <ul><li>Spring Flex 를 이용하여 Remote Object 를 호출 할 수 있다 . </li></ul><ul><li>Message 기반의 Polling 을 구현 할 수 있다 . </li></ul><ul><li>Spring Security 를 이용하여 Remote Object 에 접근 제한을 적용할수 있다 . </li></ul>

×