Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 118527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:30:31+00:00 2026-05-11T03:30:31+00:00

The Problem: I need to receive different types of content from a number of

  • 0

The Problem:

I need to receive different types of content from a number of different sources normalize them and then make them persistent through JDO.

Naive Solution?:

Create and listen on a specific port for each data type.

OR

Do a bunch of complicated parsing

A Seemingly Ideal Solution:

Have custom URL types i.e. FOO://myhost.tld, BAR://myhost.tld. any application could then send to the URL specific to the custom type and the host would ideally use Java’s URLConnection and URLStreamHandler abstract classes to create a factory that would spawn the appropriate normalization thread. Or if there is anyway other way to retrieve the connection URL I think that would be sufficient

Is this possible? I have looked through the API and other docs put cannot figure out if it is possible to use these with a Java server socket.

I should mention that in some (many? most?) cases I am not responsible for the client code.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:30:32+00:00Added an answer on May 11, 2026 at 3:30 am

    What you’re calling ‘URL type’ is the protocol part of the URL, and all it does is tell the client which protocol the server at that URL is going to expect it to talk.

    It is NOT part of a ‘meta-protocol’ that would allow the server to find out the URL it’s being called with, unless you use a protocol that contains this information as a header – which is not commonly the case. Note also that protocols usually imply a default port unless the URL also specifies a port.

    The entire URLConnection / URLStreamHandler API of Java is geared towards usage in a client, not a server, so I don’t believe it can be used the way you want.

    The first two alternatives you came up with are pretty much your options: either use different ports for the different kinds of input, or have the clients send a header that specifies the kind of input that follows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: I need to write/read objects from a file.This because I need to write/read
I have problem i need to convert from my Array structure to std::vector<int> ...
I need to map two different classes to the same view and receive an
I've stuck with one quite tricky problem. I have list of products from different
I need to send and receive a large image between programs running on different
Goal: Gain datatype date with year and month Problem: Need to help to convert
The problem: I need to ensure that a particular directory hierarchy exists in the
My problem : I need to create draggable widgets (here it's a jslider for
To solve some problem I need to compute a variant of the pascal's triangle
I faced a problem - I need to use a macro value both as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.