Advertisement
olegtikhonov

ClientTcp.java

Apr 1st, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. package org.example.tcpclient;
  2.  
  3. import org.springframework.context.support.AbstractApplicationContext;
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;
  5.  
  6. public class ClientTcp {
  7.  
  8. /**
  9. * @param args
  10. */
  11. public static void main(String[] args) {
  12. /* Spring Integration context used to get desirable beans. */
  13. AbstractApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"client-config.xml"}, false);
  14. context.refresh();
  15. context.registerShutdownHook();
  16.  
  17. TcpClientService service = context.getBean("client", TcpClientService.class);
  18.  
  19. service.send("GIMMY");
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement