📄 clientcallbackimpl.java
字号:
/**
* Copyright (c) 1996-2004 Borland Software Corporation. All Rights Reserved.
*
* This SOURCE CODE FILE, which has been provided by Borland Software as part
* of a Borland Software product for use ONLY by licensed users of the product,
* includes CONFIDENTIAL and PROPRIETARY information of Borland Software.
*
* USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS
* OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
* THE PRODUCT.
*
* IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND SOFTWARE, ITS
* RELATED COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY
* CLAIMS OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR
* DISTRIBUTION OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES
* ARISING OUT OF OR RESULTING FROM THE USE, MODIFICATION, OR
* DISTRIBUTION OF PROGRAMS OR FILES CREATED FROM, BASED ON, AND/OR
* DERIVED FROM THIS SOURCE CODE FILE.
*/
//------------------------------------------------------------------------------
// Copyright (c) 1996-2004 Borland Software Corporation. All Rights Reserved.
//------------------------------------------------------------------------------
package com.borland.samples.creditapproval.client;
import com.borland.samples.creditapproval.CORBAInterface.*;
import java.util.*;
/**
* ClientCallbackImpl implements the IDL-defined ClientCallback
* interface.
*
* This class allows the Server to provide status information to the
* client.
*/
public class ClientCallbackImpl extends ClientCallbackPOA {
protected CallbackObservable observable = new CallbackObservable();
/**
* Default constructor.
*/
public ClientCallbackImpl() {
super();
}
/**
* Provide access to the embedded Observerable Object
* @param newObserver Observer
*
*/
public void addObserver(Observer newObserver) {
observable.addObserver(newObserver);
}
/**
* Provide access to the embedded Observerable Object
* @param newObserver Observer
*
*/
public void deleteObserver(Observer newObserver) {
observable.deleteObserver(newObserver);
}
/**
* Update the status string using the embedded Observable
* @param newStatus java.lang.String
*
*/
public void updateStatusText(java.lang.String newStatus) {
observable.setStatusText(newStatus);
}
}
/**
* Since setChanged is protected, this class had to be created
* versus embedding an object of type Observable.
*/
class CallbackObservable extends Observable {
public CallbackObservable() {
super();
}
/**
* Notify all Observers of the new status text.
* @param newStatus String
*
*/
public void setStatusText(String newStatus){
setChanged();
notifyObservers(newStatus);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -