Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRKD /
avatar image
Question by NWM · Feb 20, 2017 at 06:05 AM · treptrkdtrkd api

Proxy setting in TRKD API using Java

Hello,

How can we set proxy configuration using Java? Proxy setting is not mentioned in the TRKD API developers guide. Is there any code snippet that can be shared to show the mechanism?

Thanks

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

4 Replies

  • Sort: 
avatar image
REFINITIV
Answer by mohammad.waseem · Feb 22, 2017 at 08:09 AM

This article describes configuration of a proxy server for Java.

In order to configure a proxy server for a Java application you should set up the following system properties (seearticleon Oracle site for additional details):

For HTTP traffic:

http.proxyHost(default: <none>)

The host name, or address, of the proxy server

http.proxyPort(default: 80)

The port number of the proxy server.

http.nonProxyHosts(default: localhost|127.*|[::1])

Indicates the hosts that should be accessed without going through the proxy. Typically this defines internal hosts. The value of this property is a list of hosts, separated by the '|' character. In addition the wildcard character '*' can be used for pattern matching. For example -Dhttp.nonProxyHosts=”*.foo.com|localhost” will indicate that every hosts in the foo.com domain and the localhost should be accessed directly even if a proxy server is specified.

For HTTPS traffic:

https.proxyHost(default: <none>)

The host name, or address, of the proxy server

https.proxyPort(default: 443)

The port number of the proxy server.

Note:The HTTPS protocol handler will use the same nonProxyHosts property as the HTTP protocol.

You can use two main approaches how to set environment variables in Java applications (the following examples assume your proxy server host is "localhost" and port is 8888):

Command line option when invoking the VM:

jre -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8080 myApp

jre -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8080 myApp

Using theSystem.setProperty(String, String)method, assuming that you have permission to do so:

System.setProperty("http.proxySet", "true");

System.setProperty("http.proxyHost", "localhost");

System.setProperty("http.proxyPort", "8888");

System.setProperty("https.proxySet", "true");

System.setProperty("https.proxyHost", "localhost");

System.setProperty("https.proxyPort", "8888");

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by NWM · Feb 23, 2017 at 06:28 AM

@Shaikh, Thanks for the reply. With reference to Chapter 53 "Building a java client" in the TRKD API guide, how/where does the above fit in?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by NWM · Mar 07, 2017 at 01:24 AM

@Shaikh, Can you please get back on the my previous question "

With reference to Chapter 53 "Building a java client" in the TRKD API guide, how/where does your solution fit in?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by Robin Rottier · May 11, 2017 at 04:23 AM

@NWM reviewing portal questions and I see your follow up was not answered. Do you still need help on that point? The response from Waseem indicated both a command line and code approach to setting the java proxy.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

Quote's api slow to respond

Stock status indicator via TRKD

What's TRKD API can get fields CLOSE_3M, CLOSE_6M, CLOSE_1Y

TRKD:How to detect when stock symbol have changed

Pls kindly provide the list of venues avail. in streaming PRO PREMIUM. THX!

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges