
USAGE:

   Windows
   -------
      java -cp .;JStandardSamples.jar;lib/* NewsManager.NewsSample.Main
                [ -h <host> -conn <connectionType>] -u <username> -p <password> 
                [ -r <requestType> -ns <services> -s <symbolsOrStoryID> ]
                [ -sf <storyFormat> -c <categories> -hc <headlineStoryCount> ]
                [ -b <beginTime> -e <endTime> -hd <days> -actions <allActions> ]
                [ -sp <searchText> -f <searchFields> -phrase <isPhrase> ]
                [ -all <allWords> -fulltext <fullText> -wholeword <wholeWord> ]
                [ -matchcase <matchCase> -so <sortOrder> -limit <timeLimit> ]
   Linux
   ------
      java -cp .:JStandardSamples.jar:lib/* NewsManager.NewsSample.Main
                [ -h <host> -conn <connectionType>] -u <username> -p <password> 
                [ -r <requestType> -ns <services> -s <symbolsOrStoryID> ]
                [ -sf <storyFormat> -c <categories> -hc <headlineStoryCount> ]
                [ -b <beginTime> -e <endTime> -hd <days> -actions <allActions> ]
                [ -sp <searchText> -f <searchFields> -phrase <isPhrase> ]
                [ -all <allWords> -fulltext <fullText> -wholeword <wholeWord> ]
                [ -matchcase <matchCase> -so <sortOrder> -limit <timeLimit> ]

where

   Arg           Value                    Description
   ---           -----                    -----------
   -h            <host>                   Specifies the address to use to connect to the
                                          ICE Data Services network.  
                                          For example: cm*.dataservices.theice.com
                                
   -conn         <connectionType>         Specifies the type of connection to use with the ICE Data Services
                                          network.  Valid values include:
                                
                                             0 - SOCKTYPE_LEGACY    Uses a non TLS connection.
                                             1 - SOCKTYPE_TLS       Uses a secure/encrypted socket connection.
                                             2 - SOCKTYPE_TLS_PLUS  Not yet implemented; reserved for future support.

   -u            <username> (required)    The username for the account entitled to receive 
                                          data from ICE Data Services.

   -p            <password> (required)    The password for the account entitled to receive
                                          data from ICE Data Services.

                                          note: If you do not have an account, please 
                                                contact an ICE Data Services representative.

   -r            <requestType>            Specifies what kind of news request to make.
                                          Valid values include:
   
                                          - request
                                            This is a non-streaming request for headlines 
                                            that meet the search criteria.
                                            
                                            One of the fields returned is the StoryID.  The 
                                            StoryID can then be specified to request the 
                                            StoryBody using the "story" request type in a 
                                            subsequent request.
                  
                                          - subscribe
                                            This is a streaming request for headlines that 
                                            meet the search criteria.
                                            
                                            One of the fields returned is the StoryID.  The 
                                            StoryID can then be specified to request the 
                                            StoryBody using the "story" request type in a 
                                            subsequent request.
                        
                                          - story
                                            This is a request for a story associated with a 
                                            story ID.
                        
    -ns          <services>               Comma separated list of news services.  
                                          News services are specified by the ICE Data  
                                          Services two-letter service code for each news 
                                          service.  For example:

                                          -ns "CT,PR,N1,PC"  

    -s           <symbolsOrStoryID>       Comma separated list of symbols or a single story 
                                          ID for which to make a request. Multiple symbols 
                                          must be separated by commas; if one or more 
                                          symbols contain a space the list must be enclosed
                                          in quotes. For example: 
                                          
                                             a. IBM,GE,WFM
                                             b. "ES #F,GE,WFM"

                                          note: You cannot mix symbols and story IDs.
                                                You cannot submit multiple story IDs in a 
                                                single request.

    -sf          <storyFormat>            The format the News Service should provide for 
                                          the requested story.  Valid formats include:

                                          - url
                                            The response includes a URL address to the 
                                            story.

                                          - html
                                            The response is an HTML document provided as a 
                                            string.

    -c           <categories>             A single word, or multiple words enclosed in 
                                          quotes and separated by commas that identify 
                                          vendor categories, products, topics, language, 
                                          region, etc.  
                                          For example: business
    
    -hc          <headlineStoryCount>     The number of headlines or stories to return for
                                          a search request, regardless of the total number
                                          available.
    
    -b           <beginTime>              The start of the time range in which to conduct
                                          the news search.  The date format is as follows:

                                             yyyy/MM/dd HH:mm:ss

                                          Setting this value to 0 indicates to start the
                                          search as far back as possible; forever.

    -e           <endTime>                The end of the time range in which to conduct
                                          the news search.  The date format is as follows:

                                             yyyy/MM/dd HH:mm:ss

                                          Setting this value to 0 indicates to use the
                                          current time as the end time for the search.

    -hd          <days>                   The number of days to search from the current day
                                          moving backward.

    -actions     <allActions>             Valid values include:

                                          - 0 = Send only new headlines (default)
                                          - 1 = Send all headline update actions

    -sp          <searchText>             A single word, set of words, or phrase to search.
                                          Multiple words should be separated by commas.
                                          Multiple words and phrases should be contained
                                          in quotes.

    -f           <searchFields>           The fields in which to search for the 
                                          instruments, words, phrases, etc.  
                                          Search fields include:

                                          - 1  = headline
                                          - 2  = all
                                          - 4  = story
                                          - 8  = category
                                          - 16 = symbols
                               
    -phrase      <isPhrase>               Valid values include:

                                          - 0 = The search text is not a phrase (default)
                                          - 1 = The search text is a phrase

    -all         <allWords>               Valid values include:

                                          - 0 = Not required to match all words (default)
                                          - 1 = Require all words specified
                            
    -fulltext    <fullText>               Valid values include:

                                          - 0 = Do not perform a full-text search (default)
                                          - 1 = The search is a full-text search
                            
    -wholeword   <wholeWord>              Valid values include:

                                          - 0 = Allow partial word matches (default)
                                          - 1 = Require whole word matches

    -matchcase   <matchCase>              Valid values include:

                                          - 0 = The search is case-insensitive (default)
                                          - 1 = The search is case-sensitive

                                          The default is to search the headline field.

    -so          <sortOrder>              The order in which to return the news search 
                                          results.  
                                          Valid values include:

                                          - 0 = time descending (default)
                                          - 1 = time ascending
                                          - 2 = relevancy score

    -limit       <timeLimit>              The duration this sample will run before exiting.
                                          Time duration applies to subscribe requests only.
                                          Syntax for setting the time duration is: 
                                          
                                             HH:MM:SS
                                             
                                          Setting the limit to 0 or 00:00:00 indicates to run
                                          continuously without end; sample application must be
                                          forcibly stopped.
                                          
Note:  If you do not enter a value for one of the arguments, the values listed in the 
       NewsSample.properties file will be used. 
       <username> and <password> must be entered at the command line.