org.xsocket
Annotation Type Execution
- @Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
public @interface Execution
Annotation which defines if a method should be called in 
 multithreaded context (default) or not. This annotation can be used
 to declare the desired execution modus of a call back method such as 
 onConnect or onData. xSocket is free to
 perform a NONTHREADED-annotated method in a MULTITHREADED mode.  
 
 E.g.
 
   class SmtpProtcolHandler implements IDataHandler, IConnectHandler {
      ...
      @Execution(Execution.NONTHREADED)   // default is multithreaded
      public boolean onConnect(INonBlockingConnection connection) throws IOException {
          connection.write("220 my smtp server" + LINE_DELIMITER);
          return true;
      }
      public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException {
        ...
      }
   }
 
- Author:
- grro@xsocket.org
| Optional Element Summary | 
|  int | value
 | 
 
value
public abstract int value
- 
 
- 
 - 
- Default:
- 1
 
Copyright 2008 						xSocket.org