All Questions
812
questions
1
vote
1
answer
246
views
How to change order of callbacks in spring data jdbc?
How to change order of callbacks in spring data jdbc? Primary, order, dependsOn used, didn't help.
@Bean
AfterDeleteCallback<? extends Document> test() {
return (document) -> {
...
-2
votes
1
answer
262
views
Why is the double colon operator needed in Java? [duplicate]
I'm coming from a JavaScript background and I'm seeing the :: operator for the first time. I understand what it does, but I'm wondering why it's necessary. In JavaScript, something like this is ...
0
votes
1
answer
90
views
Class A function calls a function in Class B , Once it's completed how to get notification to Class A (Android Java)
Here is the thing that I need to do.
When the user click on a button on an activity , the app must call a function in different class and sent back a notification to the activity. Then the activity ...
0
votes
0
answers
48
views
Is it possible to compare two seperate instances of objects that are considered callbacks using the equals() method?
I have two seperate objects that are from the same class, and using them as callbacks.
I would like to compare them at runtime in my app, because I'm relying on the equals method in some collection to ...
1
vote
1
answer
675
views
Java: Callback to main Thread
How can I make the callback execute in the "main thread"?
@Test
void threadTest() throws InterruptedException {
System.out.println("main thread:" + Thread.currentThread());
...
1
vote
1
answer
143
views
How to return a value retrieved inside a callback function's void overriden method?
I have the following function, which returns a long value. However, that long value (result.id.longValue()) is retrieved inside a callback's void overridden method, so I can't just return the ...
0
votes
2
answers
937
views
Merge two responses
The firstResponse and secondResponse should be combined into CombinationBothResponses and returned when the GET endpoint 127.0.0.1:8081/comb is called. However, the correctly combined response is ...
1
vote
1
answer
97
views
Best way to sort strings of filepaths into a directory structure?
I am using contentService.streamDirectory to get a callback containing all directories/files within a BitBucket project, then I am using a for loop and "callback.getFiles().get(i).toString()"...
1
vote
1
answer
214
views
JNA: Callback returns null value
I am using custom types in the callback method and always get an empty value. What could be the problem?
C code in dll(i have .h file for this dll):
typedef union
{
char caStruct[16384];
struct
...
1
vote
0
answers
116
views
How to have Process spawned by ProcessBuilder run a callback on completion/termination?
I'm writing a separate thread to monitor an OS process spawned by Java's ProcessBuilder. The process can sometimes get out of control. After a given timeout period, I want to kill the process if it's ...
2
votes
1
answer
546
views
Pointer to a function in java
I have a dynamic link library (DLL) written in c++. In my DLL I have a function like this:
void set_event_callback(EVENT_CALLBACK callback_fcn);
where EVENT_CALLBACK is a function pointer like this:
...
0
votes
0
answers
79
views
Inner class seems unnecessary in the example given in On Java 8 by Bruce Eckel
Bruce Eckel gives the following example in Chapter Inner Classed of the book On Java 8 to demonstrate the necessity of using an inner class instead of implementing an interface. But I found the code ...
0
votes
1
answer
250
views
android callback with firestore not working [duplicate]
i'm trying to get data from firestore and i want to get data before executing the rest of the code so i used callbacks
at first i created a class DbManger with a static methode and an interface
public ...
0
votes
2
answers
1k
views
Spring Boot RestTemplate get Cookie from Callback
I would like to retrieve a jwt token, using Spring RestTemplate, from a callback that is a redirect URL from a login URL.
I have been able to connect to the login URL, I have been able to follow the ...
0
votes
1
answer
286
views
Flyway migration and callbacks (java)
colleagues! I'm using flyway migration and want to use callback after my own schema is created. Is it possible to do it and how?