If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

java question

I've been working on this program for quite awhile. It's basically an adapter with multiple classes, senders, receivers, main manager, etc where I have to connect messages to a new system back to a legacy system.

One method I'm confused and stuck on is a method that creates a Command Message. here is a synopsis of the code,

/**
* It will have source and destination addresses filled out along with
* path to X File in message payload.
* method will also trigger generation of X file on local file system
* so file can be sent to remote sites.
*/

I'm confused on how to finish the one method and in converting from a String to an LegacySystem Address when I compile it comes back as
"Cannot cast class.java.lang.String to class LegacySystem.abc.Address.

I'm a little confused on how to convert from string into the Address as well as getting the source and destination addresses filled out.

until LegacySystem.abc.Address extends string, you cannt cast it to string.
you will have to write the method convertToAddress that converts a string to an legacy-address in more detail. i have no idea what a legacy-adress is for and how it should be represented as a string. but you will have to parse it.