public abstract class AbstractHttpAccess extends AbstractClient implements PostInterface
入力アイテムセットに設定された値をHttp送信します。
実行は以下の順番で行われます。
getIOParameterの実行whenBeforeHttpAccessの実行getUrlにて取得したURLにアクセスします。getSendMethodにて取得したアクセス方法にて送信を行います。
whenNewSessionを実行AdjustmentHttpResponseCodeを実行executeXsltを実行getHttpAccessErrorMessageのメッセージをダイアログに表示xmlParseを実行し、アイテムに値を格納| InputRecord | OutputRecord |
|---|---|
|
|
| Parameter | アクセスするサーバーのURL+;+xslファイルのURL(必要なければ指定なしでOK) |
|---|
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.lang.String |
faultString |
protected java.lang.String |
paramOfServerUrl |
protected java.lang.String |
paramOfXslUrl |
(package private) int |
result |
controlRecord, engineManager, errorMessage, executeType, id, inputRecord, logicalName, logicClassDelegate, outputRecord, physicalName, ruleParameter, ruleType, serverParameter, userConstantFRAME_CLOSE, FRAME_QUIT, SKIP_ALL, STOP, STOP_SELECT_ALL, SYSTEM_EXIT, SYSTEM_QUIT, TIMING_AFTER, TIMING_BEFORE, TIMING_LOAD, TIMING_ROW_CLICK, TIMING_ROW_WCLICK, TIMING_UN_LOADCANCEL, ERROR, EXECUTE_BOTH, EXECUTE_CLIENT, EXECUTE_DEBUG, EXECUTE_HTMLGATEWAY, EXECUTE_SERVER, EXECUTE_SERVERDC, IO_ERROR, IO_ERROR_EXECUTE_PARAMETER, IO_ERROR_IN, IO_ERROR_IO_MUST_SAME_COUNT, IO_ERROR_ITEM_TYPE, IO_ERROR_OUT, IO_ERROR_PARAMETER, NONE, OK, PARAMETER_DELIMITER, SKIP, USER_ERROR| コンストラクタと説明 |
|---|
AbstractHttpAccess() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
AdjustmentHttpResponseCode(int code,
java.io.InputStream is)
Httpレスポンスコードのチェック
デフォルトでは「200」以外の場合はエラーメッセージを表示して処理を中断します。
|
void |
clearCookie()
Cookieクリア
|
int |
execute()
入力引数に指定されたアイテムを物理名=値に変換しHTTP送信する
|
byte[] |
executeXslt(java.io.InputStream is,
int contentLength,
java.lang.String xslFileName)
サーバからの戻り値を指定のxslを使用しXslt行う
xslFileNameがnullもしくは空の場合には、Xsltは行いません。
|
void |
exit()
終了処理。
|
static byte[] |
getByte(java.io.InputStream is,
int contentLength)
InputStreamよりバイト配列を取得
|
java.lang.String |
getCookie()
Cookieを取得
|
java.lang.String |
getEncodeName(java.lang.String charset)
charsetからEncode名称を取得
UTF-8,ISO-8859-1,US-ASCII,ISO-8859-9,SHIFT_JIS,EUC-JPを対象にしています。
|
java.util.Properties[] |
getHeaderValues()
Http通信時にヘッダに設定する内容を
String配列で取得します。
|
java.lang.String |
getHttpAccessErrorMessage()
HttpAccess時にエラーが発生した場合にダイアログに表示するメッセージ
length()=0の場合ダイアログは表示しない
メッセージを任意に変えたい場合にはこのメソッドを上書きしてください。
|
int |
getIOParameter()
IOパラメータ取得。
|
java.lang.String |
getParamOfServerUrl()
パラメータより取得したサーバアクセスURLパスを返します。
|
java.lang.String |
getParamOfXslUrl()
パラメータより取得したXSLファイルURLパスを返します。
|
java.lang.String |
getRequestBodyOptionalValue()
Manageに紐づいた OptionalDataMapから、
REQESUT_BODYをtargetとするOptionalDataの一覧を取得し、 「Name=Data」の形式を「&」で結合した、文字列で返します |
java.util.Properties[] |
getRequestHeaderOptionalValue()
Manageに紐づいた OptionalDataMapから、
REQESUT_HEADERをtargetとするOptionalDataの一覧を取得し、 Propertiesの配列で返します それぞれのPropertiesには、"key","value"の二つの項目が設定されており、 それぞれに OptionalData.getName()、OptionalData.getData()の値が 格納された形となります。 |
static byte[] |
getResponseByLength(java.io.InputStream is,
int length)
レスポンス取得:Content-Lengthが使用できる場合
|
static byte[] |
getResponseByOutputStream(java.io.InputStream is)
レスポンス取得:Content-Lengthが使用できない場合
|
java.lang.String |
getSendContentType()
送信Content-Typeを指定
空文字の場合にはContent-Typeの設定は行いません。
|
java.net.URLConnection |
getUrlConnection()
URLConnectionを取得
|
java.lang.String |
getValueMethod(java.lang.String name,
int position)
値取得方法
Node以下のどの値を取得対象にするかを設定。
|
protected java.lang.String |
getXmlView(org.w3c.dom.Node nd,
java.lang.StringBuffer buf)
指定のNodeをStringに展開する
|
void |
setCookie(java.lang.String cookie)
Cookieを設定
|
void |
setDefaultCharsetForLog(java.lang.String charSet)
ログ出力のためのデフォルトCharSetを設定する
設定なしの場合(null)は、SystemのデフォルトCharsetになります。
|
void |
setFaultString(java.lang.String message)
エラーダイアログに表示するメッセージを設定します。
|
static void |
setItem(org.w3c.dom.traversal.NodeIterator nl,
jp.ne.mki.wedge.run.client.data.Item item)
指定のNodeIteratorのCDATA値からitemに値を設定する
|
static void |
setItem(org.w3c.dom.traversal.NodeIterator nl,
jp.ne.mki.wedge.run.client.data.Item item,
java.lang.String attributeName)
指定のNodeIteratorの属性値からitemに値を設定する
|
void |
setItems(org.w3c.dom.Document root,
java.util.Vector items)
出力Itemに値を設定する(CDATAの値を設定)
|
void |
setResult(int result)
ロジッククラス戻り値を任意に指定
|
boolean |
whenBeforeHttpAccess()
HTTPアクセスをする前の処理
サーバにアクセスする前に実行されます。
|
boolean |
whenNewSession(boolean isFirstAccess)
新しいSessionだった場合の処理
サーバアクセス後実行されます。
|
void |
writeTraceLog(java.lang.String message)
ログ出力
|
boolean |
xmlParse(byte[] xml)
サーバからの戻り値をパースし、OutItemに格納する
XMLをパースしたくない場合などはこのメソッドを上書きして取得したデータ(byte[] xml)を任意のITEMに格納してください。
|
executeCurrentAfter, executeRule, executeRule, getAdapterName, getClientRuleObject, getComponent, getComponent, getComponents, getConfig, getConfImagePath, getContentPane, getCurrentComponent, getDesktop, getExecuteIndex, getExecuteParameter, getExecuteTiming, getExecutions, getExpectNextComponent, getFrame, getFrameRunner, getImageIcon, getInItem, getInItem, getItems, getLogicClassType, getManager, getMemory, getOutItem, getOutItem, getParameter, getReturnString, getRevision, isApplet, isApplication, isClientTraceMode, isConpiled, isJWS, isServerTraceMode, isWeb, log, loopInItem, loopInItemSub, loopInOutItem, loopInOutItemSub, loopOutItem, loopOutItemSub, setEngineManager, setErrorMessageMustInComp, setErrorMessageMustOutComp, setExecuteParameter, setFocus, setFocus, setFocus, setFrameRunnerErrorStatus, setPropertyFromEngine, setStatusBarText, showErrorDialog, showFrame, showFrame, showFrame, showFrame, terminate, writeErrorLog, writeErrorLog, writeErrorLog, writeTraceLogcallDispose, checkDelegate, createErrorMessage, createLogicErrorLogRecord, createLogicExceptionLogRecord, createLogicLogRecord, dataClearOfOutRecord, dataClearOfRecord, dispose, getAppAccount, getAppAuthority, getAppMenu, getAppPassword, getClassErrorName, getClientId, getConnectionId, getConnectionPoolId, getConstantKeys, getConstantValue, getConstantValueAsStringArray, getControlRecord, getDbAccessCount, getDbErrorCode, getDbErrorMessage, getDbStatus, getDbUpdatedRecordCount, getEngineManager, getErrorMessage, getErrorMessage, getErrorMessage, getExceptionMessage, getExecuteType, getId, getInputRecordIterator, getInRecord, getInRecord, getInRecord, getInRecordCount, getInRecordList, getIpAddress_G_Index, getIpAddress_P_Index, getLogicalErrorName, getLogicalName, getLogicClassDelegate, getOutputHtml, getOutputRecordIterator, getOutRecord, getOutRecord, getOutRecord, getOutRecordCount, getOutRecordList, getPhysicalErrorName, getPhysicalName, getProjectId, getQueryEndLine, getQueryMaxCount, getQueryPageCount, getQueryStartLine, getRowSize, getRowSizeOfInRecord, getRuleParameter, getRuleParameters, getRuleParameters, getRuleParameters, getRuleType, getRuleTypeName, getServerMessage, getServerParameter, getServerStatus, getServerSubName, getServerSubRevision, getServerTran, getUpdateErrorLine, getUpdateTargetCount, getWebServerIpAddress, isExecutable, isJDK15, log, logDebug, logError, logError, logFatal, logFatal, logInfo, logTrace, logWarn, logWarn, loopInOutRecord, loopInOutRecordSub, loopInRecord, loopInRecordSub, loopOutRecord, loopOutRecordSub, setControlRecord, setErrorMessage, setErrorMessageMustInRecord, setErrorMessageMustOutRecord, setErrorMessageMustParamIsNumber, setExecuteType, setFatalError, setId, setInRecord, setLogicalName, setLogicClassDelegate, setOutputHtml, setOutRecord, setPhysicalName, setRuleParameter, setRuleType, setServerParameter, setUserConstant, showErrorDialog, showErrorDialogAddRuleName, writeErrorLog, writeErrorLog, writeLog, writeLog, writeLogclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOutputString, getSendMethod, getUrl, getXPath, getXPathErrorNode, setErrordispose, getAppAccount, getAppAuthority, getAppMenu, getAppPassword, getClassErrorName, getClientId, getConnectionId, getConnectionPoolId, getDbAccessCount, getDbErrorCode, getDbErrorMessage, getDbStatus, getEngineManager, getExceptionMessage, getExecuteType, getId, getInRecord, getInRecord, getInRecord, getInRecordCount, getIpAddress_G_Index, getIpAddress_P_Index, getLogicalErrorName, getLogicalName, getOutRecord, getOutRecord, getOutRecord, getOutRecordCount, getPhysicalErrorName, getPhysicalName, getProjectId, getQueryEndLine, getQueryMaxCount, getQueryPageCount, getQueryStartLine, getRuleParameter, getRuleParameters, getRuleType, getRuleTypeName, getServerMessage, getServerParameter, getServerStatus, getServerSubName, getServerSubRevision, getServerTran, getUpdateErrorLine, getUpdateTargetCount, getWebServerIpAddress, isExecutable, logDebug, logError, logError, logFatal, logFatal, logInfo, logTrace, logWarn, logWarn, setExecuteType, setRuleType, setServerParameter, showErrorDialog, showErrorDialogAddRuleName, writeErrorLog, writeLog, writeLogcreateLogicErrorLogRecord, createLogicExceptionLogRecord, createLogicLogRecord, getLogicClassDelegate, setControlRecord, setId, setInRecord, setLogicalName, setLogicClassDelegate, setOutRecord, setPhysicalName, setRuleParameter, setUserConstantprotected java.lang.String faultString
int result
protected java.lang.String paramOfServerUrl
protected java.lang.String paramOfXslUrl
public int getIOParameter()
execute の前に実行される。
このロジッククラスはクライアントのみ実行可能です。
パラメータを;にて分割し、サーバURL,xslファイルURLを取得します。getIOParameter インタフェース内 CommonInterfacegetIOParameter インタフェース内 jp.ne.mki.wedge.run.interfaces.RuleEngineInterfacepublic void exit()
exit インタフェース内 CommonInterfaceexit インタフェース内 jp.ne.mki.wedge.run.interfaces.RuleEngineInterfacepublic void setFaultString(java.lang.String message)
String - メッセージ文字列public int execute()
throws java.lang.Throwable
execute インタフェース内 CommonInterfaceexecute インタフェース内 jp.ne.mki.wedge.run.interfaces.RuleEngineInterfacejava.lang.Throwablepublic java.lang.String getHttpAccessErrorMessage()
public byte[] executeXslt(java.io.InputStream is,
int contentLength,
java.lang.String xslFileName)
throws java.lang.Throwable
InputStream - サーバから取得した値int - サーバから取得した値の長さString - xslファイルURLパスjava.lang.Throwablepublic java.lang.String getParamOfXslUrl()
public java.lang.String getParamOfServerUrl()
public boolean xmlParse(byte[] xml)
throws java.lang.Throwable
xmlParse インタフェース内 PostInterfacebyte[] - サーバからの戻り値java.lang.Throwablepublic java.lang.String getValueMethod(java.lang.String name,
int position)
throws java.lang.Throwable
getValueMethod インタフェース内 PostInterfaceString - Itemの物理名称java.lang.Throwablepublic final void setItems(org.w3c.dom.Document root,
java.util.Vector items)
throws java.lang.Throwable
setItems インタフェース内 PostInterfaceDocument - ドキュメントルートVector - 格納するアイテム群java.lang.Throwablepublic static final void setItem(org.w3c.dom.traversal.NodeIterator nl,
jp.ne.mki.wedge.run.client.data.Item item,
java.lang.String attributeName)
NodeIterator - itemタグ以下のNodeIteratorItem - 格納するアイテムString - 属性名称public static final void setItem(org.w3c.dom.traversal.NodeIterator nl,
jp.ne.mki.wedge.run.client.data.Item item)
NodeIterator - itemタグ以下のNodeIteratorItem - protected final java.lang.String getXmlView(org.w3c.dom.Node nd,
java.lang.StringBuffer buf)
Node - StringBuffer - public final void writeTraceLog(java.lang.String message)
writeTraceLog インタフェース内 CommonInterfacewriteTraceLog クラス内 AbstractBaseString - 出力するメッセージpublic boolean whenBeforeHttpAccess()
public boolean whenNewSession(boolean isFirstAccess)
public boolean AdjustmentHttpResponseCode(int code,
java.io.InputStream is)
public final java.net.URLConnection getUrlConnection()
public final void setResult(int result)
int - 戻り値public final java.lang.String getCookie()
public final void clearCookie()
public final void setCookie(java.lang.String cookie)
public java.lang.String getSendContentType()
public final java.lang.String getEncodeName(java.lang.String charset)
String - キャラクタセット名称public static byte[] getByte(java.io.InputStream is,
int contentLength)
throws java.lang.Exception
InputStream - 読み込み対象のInputStreamint - InputStreamの長さjava.lang.Exceptionpublic static byte[] getResponseByLength(java.io.InputStream is,
int length)
throws java.lang.Exception
InputStream - 読み込み対象のInputStreamint - InputStreamの長さjava.lang.Exceptionpublic static byte[] getResponseByOutputStream(java.io.InputStream is)
throws java.lang.Exception
InputStream - 読み込み対象のInputStreamjava.lang.Exceptionpublic void setDefaultCharsetForLog(java.lang.String charSet)
charSet - public final java.util.Properties[] getRequestHeaderOptionalValue()
URLEncode - URLエンコードを行うかどうかpublic final java.lang.String getRequestBodyOptionalValue()
URLEncode - URLエンコードを行うかどうかpublic java.util.Properties[] getHeaderValues()