[jboss-dev-forums] [Design of JBoss Portal] - Re: Initial UI Server Prototype Discussion

julien@jboss.com do-not-reply at jboss.com
Fri Jul 6 06:53:08 EDT 2007


The consumer and producer exchange data using a protocol, which simply means that the consumer makes a request, the producer perform something and returns back a response that the consumer should handle.

The protocol needs to be modelled under the form of a hierarchy of serializable objects.

public abstract class UIRequest implements Serializable { }

public abstract class UIResponse implements Serializable { }

Now the hardest part is to modelize the protocol such as it can handle our use cases.

The following in based on the concepts today that exist in the core of portal and are just an example, it's probably going to change:

// Obtain a page from the producer
  | public class GetUIElement extends UIRequest {
  |    private String elementId;
  |    ...
  | }

// Process an opaque URL
  | public class ProcessURL extends UIRequest {
  |    private String url;
  |    ...
  | }

// Move a window
  | public class MoveWindow extends UIRequest {
  |    ...
  | }

// Remove a window
  | public class RemoveWindow extends UIRequest {
  |    ...
  | }

etc....

The kind of responses are

public class GetUIElementResponse extends UIResponse {
  |   // Contains the elements necessary for the consumer to build the element on screen
  | }

public class RedirectLocationResponse extends UIResponse {
  |    // The producer wants the consumer to show an URL
  |    // Translates into send redirect in the classic
  |    // Translates into document.location = location in the ajax
  |    private String location;
  |    ...
  | }

etc...



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061214#4061214

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061214



More information about the jboss-dev-forums mailing list