com.instantbank.lettertemplate.editor.applet
Class TemplateEditorSender
java.lang.Object
|
+--com.instantbank.lettertemplate.editor.applet.TemplateEditorSender
- public class TemplateEditorSender
- extends java.lang.Object
This class provides a simple method of posting multiple Serialized objects
to a Java servlet and getting objects in return. This code was inspired by
code samples from the book 'Java Servlet Programming' by Jason Hunter and
William Crawford (O'Reilly & Associates, 1998).
- Author:
- InstantBank (Rodrigo Lopez, Ma. Consuelo Franky)
Method Summary |
static java.io.ObjectInputStream |
postObjects(java.net.URL servlet,
java.io.Serializable[] objs)
Sends a stream of objects to a servlet and waits a response. |
static void |
postObjectsNoAnswer(java.net.URL servlet,
java.io.Serializable[] objs)
Same as postObjects method but
there is no expected answer. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
TemplateEditorSender
public TemplateEditorSender()
postObjects
public static java.io.ObjectInputStream postObjects(java.net.URL servlet,
java.io.Serializable[] objs)
throws java.lang.Exception
- Sends a stream of objects to a servlet and waits a response.
- Parameters:
servlet
- The servlet to whom the objects are posted.objs
- The actual posted objects.- Returns:
- An ObjectInputStream containing the response. The
Objects inside this stream will be read (and properly casted) by the
corresponding "asking" method in the
TemplateEditorProxy
class. - Throws:
java.lang.Exception
-
postObjectsNoAnswer
public static void postObjectsNoAnswer(java.net.URL servlet,
java.io.Serializable[] objs)
throws java.lang.Exception
- Same as
postObjects
method but
there is no expected answer.
- Parameters:
servlet
- objs
- - Throws:
java.lang.Exception
-