|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glasskeylabs.gubcast.Gubcaster
Gubcaster is the protocol engine used by an application-specific Gubcast server to communicate with Gubcast applets. To enable a given application program to use the Gubcast protocol, construct an instance of Gubcaster with an attached Gubregistry and, in the Gubregistry and other application code, call pushPage() and other Gubcaster methods as necessary.
Constructor Summary | |
Gubcaster(int ownPortNbr,
Gubregistry registry)
Construct a new Gubcaster. |
|
Gubcaster(java.lang.String ownHostName,
int ownPortNbr,
Gubregistry registry)
Construct a new Gubcaster. |
Method Summary | |
void |
close()
Close and deactivate the Gubcaster. |
java.lang.String |
getHostName()
Return host name at which Gubcast clients will register with this Gubcaster. |
int |
getPortNbr()
Return TCP port number at which Gubcast clients will register with this Gubcaster . |
Gubregistry |
getRegistry()
Return the Gubregistry to which client registration and unregistration events are delivered. |
void |
pushPage(Gubclient client,
java.lang.String target,
java.lang.String url)
"Push" information to a client Web browser. |
void |
pushPage(Gubclient client,
java.lang.String target,
java.net.URL url)
"Push" information to a client Web browser as described above. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Gubcaster(java.lang.String ownHostName, int ownPortNbr, Gubregistry registry) throws java.net.SocketException, java.net.UnknownHostException, java.io.IOException
ownHostName
- Internet host (domain) name at which Gubcast clients
will register with this Gubcaster. May be omitted unless the host machine
has multiple interfaces with different domain names.ownPortNbr
- TCP port number at which Gubcast clients will
register with this Gubcaster.registry
- Instance of some class that implements Gubregistry,
to which Gubcast client registration and unregistration events will be
delivered.public Gubcaster(int ownPortNbr, Gubregistry registry) throws java.net.SocketException, java.net.UnknownHostException, java.io.IOException
Method Detail |
public void pushPage(Gubclient client, java.lang.String target, java.lang.String url) throws java.io.IOException
client
- The Gubcast client to which information is to be pushed.
Gubclient objects are provided by Gubcaster to the application's
registerClient() method at the time the clients register (that is, at the
time the Gubcast applets embedded in application HTML pages load and start).target
- The name of the browser target to push information to.
The fact that a client is registered means that some user is currently viewing
a Web page that contains the client Gubcast applet, typically in a frame. The
target parameter specifies the destination of the pushed information: one of
the frames of that page, the entire browser window, or a new browser window.
The client's own name may be designed, by the Web page and application
developer, to give some clues about the structure of the page if necessary.
In addition to any frame names that were asserted in the HTML of the viewed
page, the following additional reserved target names may also be used:
_blank
: the pushed information will appear in a new window
that has no name.
_self
or none: information is pushed to the "current frame",
the frame that contains the Gubcast applet.
_parent
: information is pushed to the frame that immediately
contains the current frame.
_top
: information is pushed to the base frame of the current
window, that is, that frame containing the current frame which is not itself
contained in any other frame.
url
- The URL specifying the information to push to the
target. This URL could simply identify a file of HTML text, it could cause
a CGI script or Java servlet to run, etc.public void pushPage(Gubclient client, java.lang.String target, java.net.URL url) throws java.io.IOException
public java.lang.String getHostName()
public int getPortNbr()
public Gubregistry getRegistry()
public void close() throws java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |