Blackberry JAVA DEVELOPMENT ENVIRONMENT - - CRYPTOGRAPHIC SMART CARD DRIVER - DEVELOPMENT GUIDE Průvodce řešením problémů Strana 228

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 286
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 227
228
BlackBerry Java Development Environment Development Guide
//constructors --------------------------------------------------------------
/** Creates a new HTTPPushServer instance*/
public HTTPPushServer() {
initComponents ();
pack ();
//sizing code for the main frame
setSize(_panel.getWidth(), _panel.getHeight());
setLocation(100,100);
notificationThread= new NotificationThread();
}
private URL getPushURL(String DevicePin)
{
/**
* The format of the URL is:
* http://<host>:<port>/push?DESTINATION=<device
pin>&PORT=<device_port>&REQUESTURI=<post uri>
*/
URL _pushURL = null;
try {
if ((DevicePin == null) || (DevicePin.length() == 0))
{
DevicePin = DEVICE_PIN;
}
_pushURL = new URL(“http”, “localhost”, MDS_PORT, “/push?DESTINATION=”+
DevicePin +”&PORT=”+DEVICE_PORT+”&REQUESTURI=localhost”);
} catch (MalformedURLException e) {
System.err.println(e.toString());
}
return _pushURL;
}
/**
* This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the FormEditor.
*/
private void initComponents() {//GEN-BEGIN:initComponents
_panel = new javax.swing.JPanel();
_textField = new javax.swing.JTextField();
_textArea= new javax.swing.JTextArea();
_pinField = new javax.swing.JTextField(DEVICE_PIN);
_label = new javax.swing.JTextArea();
_notification=new javax.swing.JTextArea();
_rimButton= new javax.swing.JRadioButton(“rim”);
_papButton= new javax.swing.JRadioButton(“pap”);
_buttonGroup= new javax.swing.ButtonGroup();
_buttonGroup.add(_rimButton);
_buttonGroup.add(_papButton);
_sendButton = new javax.swing.JButton();
getContentPane().setLayout(null);
Zobrazit stránku 227
1 2 ... 223 224 225 226 227 228 229 230 231 232 233 ... 285 286

Komentáře k této Příručce

Žádné komentáře