PrintServiceAttributeListener
PrintServiceAttributeListener
프린트 서비스의 상태를 모니터링하기 위해 특정 PrintService에 붙이는 리스너 인터페이스예요. 인쇄 서비스가 상태를 바꿀 때마다 이 리스너를 통해 이벤트를 받을 수 있어요.
본문
javax.print.event 패키지에 속하는 인터페이스로, 이 리스너 인터페이스의 구현 객체를 PrintService에 연결해서 인쇄 서비스의 상태를 감시해요. 특정 인쇄 작업(job)을 모니터링하려면 PrintJobListener와 PrintJobAttributeListener를 사용해요.
public interface PrintServiceAttributeListener
attributeUpdate
void attributeUpdate(PrintServiceAttributeEvent psae)
인쇄 서비스에서 이벤트가 발생했을 때 리스너에게 알리기 위해 호출돼요.
- 파라미터
psae: 통지되는 이벤트
서비스는 이 메서드를 이벤트 통지 스레드에서 호출해요. 클라이언트는 이 콜백에서 오래 걸리는 처리를 수행하면 안 돼요. 그렇게 하면 이후 이벤트 통지가 막힐 수 있거든요.