Apple WebObjects 3.5 Manual do Utilizador Página 48

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 218
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 47
Chapter 3 Common Methods
48
// WebScript DodgeDemo Application.wos
- awake {
++requestCount;
[self logWithFormat:@"Now serving request %@", requestCount];
}
// Java DodgeDemo Application.java
public void awake() {
++requestCount;
this.logString("Now serving request " + requestCount);
}
Session Initialization
A session object is created each time the application receives a request from a
new user. An application may have multiple sessions running concurrently. The
session ends when a session time-out value is reached.
In the session object’s
init method, you set the session’s time-out value and
initialize variables that should have unique values for each session. For example,
in the CyberWind application, each session keeps track of which number it is.
These values are changed in the session object’s
init method:
//From CyberWind Session.wos
- init {
[super init];
[self setTimeOut:120]; // session idle time is 2 minutes.
[[self application] setSessionCount:[[self application]
sessionCount + 1];
sessionNumber = [[self application] sessionCount];
return self;
}
//From CyberWindJava Session.java
public Session() {
super();
Application application = (Application)application();
this.setTimeOut(120);
application.setSessionCount(application.sessionCount() + 1);
sessionNumber = application.sessionCount();
}
The session object’s awake method is invoked each time the user associated with
the session makes a new request. After the application object has performed its
own
awake method, it restores the appropriate session object and sends it the
awake message too.
The CyberWind application keeps track of the number of requests per session.
It increments the number in the session’s
awake method.
- awake {
requestCount++;
}
Vista de página 47
1 2 ... 43 44 45 46 47 48 49 50 51 52 53 ... 217 218

Comentários a estes Manuais

Sem comentários

Kenwood DNX 9280 BT podręczniki

Instrukcje obsługi i podręczniki użytkownika dla odtwarzacze CD Kenwood DNX 9280 BT.
Dostarczamy pdf podręczników Kenwood DNX 9280 BT do pobrania za darmo według typów dokumentów:






Więcej produktów i instrukcji dla odtwarzacze CD Kenwood

Modele Rodzaj dokumentu
DM-SG7 Instrukcja Użytkownika   Kenwood DM-SG7 User's Manual, 52 strony
DPF-J7020 Instrukcja Użytkownika   Kenwood DPF-J7020 User's Manual, 32 strony
DPX-5030 Instrukcja Użytkownika   Kenwood DPX-5030 User's Manual, 40 strony
KDC-M4524G Instrukcja Użytkownika   Kenwood KDC-M4524G User's Manual, 136 strony
HM-DV6MD Instrukcja Użytkownika   Kenwood HM-DV6MD User's Manual, 104 strony
HM-233 Instrukcja Użytkownika   Kenwood HM-233 User's Manual, 28 strony
MDX-G2 Instrukcja Użytkownika   Kenwood MDX-G2 User's Manual, 60 strony
DPC-X447MP Instrukcja Użytkownika   Kenwood DPC-X447MP User's Manual, 6 strony
KDC-D300 Instrukcja Użytkownika   Kenwood KDC-D300 User's Manual, 15 strony
XD-402 Instrukcja Użytkownika   Kenwood XD-402 User's Manual, 64 strony
MDX-01 Instrukcja Użytkownika   Kenwood MDX-01 User's Manual, 60 strony