Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Changeset 3885

Show
Ignore:
Timestamp:
04/09/08 15:12:11 (9 months ago)
Author:
tmdugan
Message:

-- sockethl7listener

* changed TestSimpleServer schedulable task to accept a port from a TaskConfig property. If no such property exists, the task port defaults to the one defined in the global property. This allows multiple instances of the task to listen on different ports.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/sockethl7listener/src/org/openmrs/module/sockethl7listener/TestSimpleServer.java

    r3725 r3885  
    2727        public void initialize(TaskConfig config) 
    2828        { 
     29                AdministrationService adminService = Context.getAdministrationService(); 
     30 
     31                this.taskConfig = config; 
     32 
     33                String portString = this.taskConfig.getProperty("port"); 
     34 
     35                if (portString == null) 
     36                { 
     37                        portString = adminService 
     38                                        .getGlobalProperty("sockethl7listener.port"); 
     39                } 
     40 
    2941                try 
    3042                { 
    31                         AdministrationService adminService = Context.getAdministrationService(); 
    32                         String portString = adminService.getGlobalProperty("sockethl7listener.port"); 
    3343                        Integer port = null; 
    3444                         
     
    4151                        } 
    4252                         
    43                         this.taskConfig = config; 
    4453                        this.server = new SimpleServer(port, LowerLayerProtocol 
    4554                                        .makeLLP(), new PipeParser());