|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.cbse.jeasy.JEObject
com.cbse.jeasy.JEHttpClient
public class JEHttpClient
A class using for connection between JEasy presentation layer and application layer. The JEHttpClient connects to the JEHttpConnector running as a servlet at an application server. The parameter service and sXml are transfered
| Field Summary |
|---|
| Fields inherited from class com.cbse.jeasy.JEObject |
|---|
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING |
| Constructor Summary | |
|---|---|
JEHttpClient(java.lang.String s)
Reads the properties from a string. |
|
| Method Summary | |
|---|---|
java.lang.String |
callAndWait()
Use this method to call the server and wait for a return. |
byte[] |
compress(byte[] ba)
|
byte[] |
compress(byte[] ba,
javax.crypto.Cipher ec)
|
byte[] |
compress(java.lang.String s)
|
byte[] |
compress(java.lang.String s,
javax.crypto.Cipher ec)
|
byte[] |
decompress(byte[] ba)
|
byte[] |
decompress(java.io.InputStream in)
|
byte[] |
decompress(java.io.InputStream in,
javax.crypto.Cipher dc)
|
byte[] |
decrypt(byte[] ba,
javax.crypto.Cipher decryptCipher)
|
java.lang.String |
decrypt(java.io.InputStream in,
javax.crypto.Cipher dc)
|
byte[] |
encrypt(byte[] ba,
javax.crypto.Cipher encryptCipher)
|
java.lang.String |
getSessionId()
|
java.net.URL |
getURL()
|
boolean |
isAlive()
If b is true the method requests a session id from the JEHttpConnector, who will instantiate a JEDispatcher object at the server. |
void |
readAttachment()
Transfers byte from the JEHttpConnector to the clients OütputBuffer |
void |
run()
When running as a thread this method is called when the client starts the thread. |
java.lang.String |
sendAttachment(java.lang.String filePath,
java.lang.String fileName,
java.io.InputStream attachment)
Transfers byte out of an InputStream to the server and calls the service Use this method to call the server and wait for a return. |
boolean |
setCrypt(boolean b,
java.lang.String key)
If b is true the data send to and received from the server are crypted |
void |
setParameters(JECallBack o,
java.lang.String service,
java.lang.String sXml)
Because the JEHttpClient is running as a thread, the parameters are to be set here. |
void |
setParameters(JECallBack o,
java.lang.String service,
java.lang.String sXml,
java.io.OutputStream os)
Because the JEHttpClient is running as a thread, the parameters are to be set here. |
boolean |
setSession(boolean b)
If b is true the method requests a session id from the JEHttpConnector, who will instantiate a JEDispatcher object at the server. |
void |
setSimulate(boolean simulate)
Simulates the connection to JEHttpConnector by instatiating a local JEHttpConnector. |
void |
setSimulateParams(java.lang.String JEHttpConnectorClass,
java.lang.String JEDispatcherClass,
java.lang.String property)
|
void |
setURL(java.lang.String URL)
|
| Methods inherited from class com.cbse.jeasy.JEObject |
|---|
backupEntry, clear, deserializeValue, getApplet, getApplLocale, getCenter, getComponent, getEast, getElementAt, getElementSize, getId, getJCallBack, getJClass, getLabel, getMode, getName, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, getXMLtag, isEditable, isEnabled, isEnterprise, isProfessional, isStandard, isVisible, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, restoreEntry, serializeValue, setApplet, setApplLocale, setEditable, setEditable, setEnabled, setEnabled, setFocus, setJCallBack, setMarkable, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible, setVisible, start, wasEntryChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JEHttpClient(java.lang.String s)
s - contains properties and valuesJE#PropertyString| Method Detail |
|---|
public void setURL(java.lang.String URL)
public void setSimulate(boolean simulate)
public void setSimulateParams(java.lang.String JEHttpConnectorClass,
java.lang.String JEDispatcherClass,
java.lang.String property)
public java.net.URL getURL()
public void setParameters(JECallBack o,
java.lang.String service,
java.lang.String sXml)
o - the JECallBack object (your JEasy client class) who's
callBackInvoke method is called with the return string of the
JEDispatcherservice - the service id the JEDispatcher performs. In general it is a
method of JEDispatcher.sXml - an xml string holding all parameters you need for this
service. The JEDispatcher has to read xml and has to know
about the tagnames
public void setParameters(JECallBack o,
java.lang.String service,
java.lang.String sXml,
java.io.OutputStream os)
o - the JECallBack object (your JEasy client class) who's
callBackInvoke method is called with the return string of the
JEDispatcherservice - the service id the JEDispatcher performs. In general it is a
method of JEDispatcher.sXml - an xml string holding all parameters you need for this
service. The JEDispatcher has to read xml and has to know
about the tagnamesos - OutputStream to receive the attachment
public boolean setCrypt(boolean b,
java.lang.String key)
public boolean isAlive()
public boolean setSession(boolean b)
public void run()
run in interface java.lang.Runnable
public java.lang.String callAndWait()
throws java.lang.Exception
java.lang.Exceptionpublic void readAttachment()
public java.lang.String sendAttachment(java.lang.String filePath,
java.lang.String fileName,
java.io.InputStream attachment)
throws java.lang.Exception
java.lang.Exception
public byte[] compress(byte[] ba,
javax.crypto.Cipher ec)
throws java.lang.Exception
java.lang.Exception
public byte[] compress(java.lang.String s)
throws java.lang.Exception
java.lang.Exception
public byte[] compress(java.lang.String s,
javax.crypto.Cipher ec)
throws java.lang.Exception
java.lang.Exception
public byte[] decompress(java.io.InputStream in)
throws java.lang.Exception
java.lang.Exception
public byte[] decompress(java.io.InputStream in,
javax.crypto.Cipher dc)
throws java.lang.Exception
java.lang.Exceptionpublic byte[] compress(byte[] ba)
public byte[] decompress(byte[] ba)
public java.lang.String decrypt(java.io.InputStream in,
javax.crypto.Cipher dc)
throws java.lang.Exception
java.lang.Exception
public byte[] decrypt(byte[] ba,
javax.crypto.Cipher decryptCipher)
throws java.lang.Exception
java.lang.Exception
public byte[] encrypt(byte[] ba,
javax.crypto.Cipher encryptCipher)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getSessionId()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||