Stomp Client Stomp 클래스
(PECL stomp >= 0.1.0)
소개
PHP와 Stomp 호환 메시지 브로커 간의 연결을 나타냅니다.
클래스 개요
class Stomp {
/* Methods */
public __construct(
string $broker = ini_get("stomp.default_broker_uri"),
string $username = ?,
string $password = ?,
array $headers = ?
)
public abort(string $transaction_id, array $headers = ?): bool
stomp_abort(resource $link, string $transaction_id, array $headers = ?): bool
public ack(mixed $msg, array $headers = ?): bool
stomp_ack(resource $link, mixed $msg, array $headers = ?): bool
public begin(string $transaction_id, array $headers = ?): bool
stomp_begin(resource $link, string $transaction_id, array $headers = ?): bool
public commit(string $transaction_id, array $headers = ?): bool
stomp_commit(resource $link, string $transaction_id, array $headers = ?): bool
stomp_connect(
string $broker = ini_get("stomp.default_broker_uri"),
string $username = ?,
string $password = ?,
array $headers = ?
): resource
stomp_close(resource $link): bool
public error(): string
stomp_error(resource $link): string
public getReadTimeout(): array
stomp_get_read_timeout(resource $link): array
public getSessionId(): string|false
stomp_get_session_id(resource $link): string|false
public hasFrame(): bool
stomp_has_frame(resource $link): bool
public readFrame(string $class_name = "stompFrame"): stompframe
stomp_read_frame(resource $link): array
public send(string $destination, mixed $msg, array $headers = ?): bool
stomp_send(
resource $link,
string $destination,
mixed $msg,
array $headers = ?
): bool
public setReadTimeout(int $seconds, int $microseconds = ?): void
stomp_set_read_timeout(resource $link, int $seconds, int $microseconds = ?): void
public subscribe(string $destination, array $headers = ?): bool
stomp_subscribe(resource $link, string $destination, array $headers = ?): bool
public unsubscribe(string $destination, array $headers = ?): bool
stomp_unsubscribe(resource $link, string $destination, array $headers = ?): bool
public __destruct()
}
목차
- Stomp::abort — 진행 중인 트랜잭션 롤백
- Stomp::ack — 메시지 소비 확인
- Stomp::begin — 거래 시작
- Stomp::commit — 진행 중인 트랜잭션을 커밋합니다.
- Stomp::__construct — 연결을 엽니다.
- Stomp::__destruct — 스톰프 연결을 닫습니다
- Stomp::error — 마지막 스톰프 오류를 가져옵니다.
- Stomp::getReadTimeout — 읽기 시간 초과 가져오기
- Stomp::getSessionId — 현재 스톰프 세션 ID를 가져옵니다.
- Stomp::hasFrame — 읽을 준비가 된 프레임이 있는지 여부를 나타냅니다.
- Stomp::readFrame — 다음 프레임을 읽습니다.
- Stomp::send — 메시지를 보냅니다
- Stomp::setReadTimeout — 읽기 시간 초과 설정
- Stomp::subscribe — 지정된 대상을 수신하도록 등록합니다.
- Stomp::unsubscribe — 기존 구독을 제거합니다.