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 6094729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:42:49+00:00 2026-05-23T12:42:49+00:00

A newbie question on thrift if anyone else is in a situation trying to

  • 0

A newbie question on thrift if anyone else is in a situation trying to generate the below java class from thriftIDL. I see it only supports 32-bit non negative integer values assigned. Is this because of lack of support for below enum types in other languages? I did not see if this kind can be done in thrift IDL.

public enum ExceptionTypes {

        ERROR_THIS("APP_EXP_001","Some message"), ERROR_THAT(...etc

    private String errorCode;

    private String defaultMessage;

    private ExceptionTypes(String errorCode, String defaultMessage) {
        this.errorCode = errorCode;
        this.defaultMessage = defaultMessage;
    }

    public String getErrorCode() {
        return this.errorCode;
    }

    public String getDefaultMessage() {
        return this.defaultMessage;
    }
}
  • 1 1 Answer
  • 0 Views
  • 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. Editorial Team
    Editorial Team
    2026-05-23T12:42:50+00:00Added an answer on May 23, 2026 at 12:42 pm

    There is no way to add description of behavior to the Thirft enums, mainly because Thirft was intended to be small and applicable to many languages.

    However, you could write yourself a constructor that creates one java enum like above when given thirft one. This will add one layer of processing in your code after you have received data from the thrift layer, but in real use cases, data structures used on the wire are rarely exactly the same as ones used inside the app anyway.

    Thirft (and any rpc, CORBA or similar layer) serves to simplify network code and add robustness, not to hide its existence so that one could forget about it.

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

Sidebar

Related Questions

Newbie question on drools. I am trying to access the following java class in
Newbie question :o) I'm trying to generate a horizontal line with jQuery Draggable objects
Newbie question, but I have this code: import java.util.*; import java.io.*; public class Welcome1
Newbie question. I have Django models that look like this: class Video(models.Model): uploaded_by =
Newbie question since I'm not up to speed using maven at all. I'm trying
Newbie question. I have two c# classes - a code class (say, CodeClass) and
another newbie-question regarding rails and bootstrap. I am using something like this: <div class=tabbable
Newbie question. I am trying to use ActiveRecord::Base.connection.execute(..) in a ruby 3.1 app and
Newbie question. Given the following html. <div id=mycontainer1 class=container> <input type=text class=name/> <input type=text
Newbie question... I am using silverlight to POST data to my GAE application class

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.