|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tobesoft.xplatform.tx.PlatformHttpClient
HTTP 통신으로 데이터(PlatformData)를 송수신한다.
다음은 PlatformHttpClient을 이용하여 데이터를 송수신하는 예제이다.
PlatformData reqData = ...; String url = "http://host/context/service.jsp"; PlatformHttpClient client = new PlatformHttpClient(url, PlatformType.CONTENT_TYPE_XML); client.sendData(reqData); PlatformData resData = client.receiveData(); client.close();
| Constructor Summary | |
PlatformHttpClient(java.lang.String spec)
URL의 위치를 가지는 생성자이다. |
|
PlatformHttpClient(java.lang.String spec,
java.lang.String contentType)
URL의 위치와 송수신 형식(contentType)을 가지는 생성자이다. |
|
PlatformHttpClient(java.lang.String spec,
java.lang.String contentType,
java.lang.String charset)
URL의 위치, 송수신 형식(contentType)과 문자셋(charset)을 가지는 생성자이다. |
|
| Method Summary | |
void |
addProtocolType(java.lang.String protocolType)
프로토콜 형식(protocolType)을 추가한다. |
void |
clearProtocolTypes()
모든 프로토콜 형식(protocolType)을 삭제한다. |
void |
close()
HTTP 연결을 종료한다. |
boolean |
containsProtocolType(java.lang.String protocolType)
프로토콜 형식(protocolType)의 포함 여부를 검사한다. |
java.lang.String |
getCharset()
문자셋(charset)을 반환한다. |
java.lang.String |
getContentType()
송수신 형식(contentType)을 반환한다. |
java.lang.String |
getProtocolType(int index)
프로토콜 형식(protocolType)을 반환한다. |
int |
getProtocolTypeCount()
프로토콜 형식(protocolType)의 갯수를 반환한다. |
java.lang.String |
getStreamLogDir()
예외발생시 수신받은 데이터(stream)를 저장할 위치를 반환한다. |
int |
getStreamLogMaxSize()
isStreamLogEnabled가 "true" 인 경우 수신받을 데이터(stream)를
저장할 최대 버퍼 크기를 반환한다. |
boolean |
isStreamLogEnabled()
예외발생시 수신받은 데이터(stream)의 저장 여부를 검사한다. |
boolean |
isVerbose()
INFO 로그의 출력 여부를 검사한다. |
PlatformData |
receiveData()
데이터( PlatformData)를 수신받는다.
|
void |
removeProtocolType(int index)
프로토콜 형식(protocolType)을 삭제한다. |
void |
removeProtocolType(java.lang.String protocolType)
프로토콜 형식(protocolType)을 삭제한다. |
void |
sendData(PlatformData data)
데이터( PlatformData)를 송신한다.
|
void |
setCharset(java.lang.String charset)
문자셋(charset)을 설정한다. |
void |
setContentType(java.lang.String contentType)
송수신 형식(contentType)을 설정한다. |
void |
setStreamLogDir(java.lang.String streamLogDir)
예외발생시 수신받은 데이터(stream)를 저장할 위치를 설정한다. |
void |
setStreamLogEnabled(boolean isStreamLogEnabled)
예외발생시 수신받은 데이터(stream)의 저장 여부를 설정한다. |
void |
setStreamLogMaxSize(int streamLogMaxSize)
isStreamLogEnabled가 "true" 인 경우 수신받을 데이터(stream)를
저장할 최대 버퍼 크기를 설정한다.
|
void |
setVerbose(boolean verbose)
INFO 로그의 출력 여부를 설정한다. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PlatformHttpClient(java.lang.String spec)
URL의 위치를 가지는 생성자이다.
spec - URL의 위치
public PlatformHttpClient(java.lang.String spec,
java.lang.String contentType)
URL의 위치와 송수신 형식(contentType)을 가지는 생성자이다.
spec - URL의 위치contentType - 송수신 형식
public PlatformHttpClient(java.lang.String spec,
java.lang.String contentType,
java.lang.String charset)
URL의 위치, 송수신 형식(contentType)과 문자셋(charset)을 가지는 생성자이다.
spec - URL의 위치contentType - 송수신 형식charset - 문자셋| Method Detail |
public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
contentType - 송수신 형식public java.lang.String getCharset()
public void setCharset(java.lang.String charset)
charset - 문자셋public java.lang.String getProtocolType(int index)
index - 위치PlatformType.PROTOCOL_TYPE_ZLIBpublic void addProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식
java.lang.IllegalArgumentException - 프로토콜 형식(protocolType) 중복 추가시PlatformType.PROTOCOL_TYPE_ZLIBpublic void removeProtocolType(int index)
index - 위치public void removeProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식public boolean containsProtocolType(java.lang.String protocolType)
protocolType - 프로토콜 형식
public void clearProtocolTypes()
public int getProtocolTypeCount()
public boolean isVerbose()
verbose가 "true" 인
경우에만 로그가 출력된다.
setVerbose(boolean)public void setVerbose(boolean verbose)
verbose - INFO 로그의 출력 여부isVerbose()public boolean isStreamLogEnabled()
setStreamLogEnabled(boolean),
getStreamLogDir()public void setStreamLogEnabled(boolean isStreamLogEnabled)
isStreamLogEnabled - 저장 여부isStreamLogEnabled(),
getStreamLogDir()public java.lang.String getStreamLogDir()
isStreamLogEnabled(),
setStreamLogDir(String)public void setStreamLogDir(java.lang.String streamLogDir)
streamLogDir - 저장 위치isStreamLogEnabled(),
getStreamLogDir()public int getStreamLogMaxSize()
isStreamLogEnabled가 "true" 인 경우 수신받을 데이터(stream)를
저장할 최대 버퍼 크기를 반환한다. 기본값은 4MB 이다.
Debug 용으로 메모리를 많이 사용하므로, 필요한 경우에만 사용한다.
isStreamLogEnabled(),
setStreamLogMaxSize(int)public void setStreamLogMaxSize(int streamLogMaxSize)
isStreamLogEnabled가 "true" 인 경우 수신받을 데이터(stream)를
저장할 최대 버퍼 크기를 설정한다.
Debug 용으로 메모리를 많이 사용하므로, 필요한 경우에만 사용한다.
streamLogMaxSize - 최대 버퍼 크기isStreamLogEnabled(),
getStreamLogMaxSize()
public void sendData(PlatformData data)
throws PlatformException
PlatformData)를 송신한다.
송수신 형식(contentType)이 설정되지 않은 경우 PlatformType.DEFAULT_CONTENT_TYPE이 적용된다.
PlatformException
public PlatformData receiveData()
throws PlatformException
PlatformData)를 수신받는다.
송수신 형식(contentType)이 설정되지 않은 경우 PlatformType.DEFAULT_CONTENT_TYPE이 적용된다.
PlatformExceptionpublic void close()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||