org.xsocket
Annotation Type Resource
@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface Resource
The Resource annotation marks a resource that is required
by the application.
E.g.
class SmtpProtcolHandler implements IDataHandler, IConnectHandler {
@Resource
private IServer srv;
...
public boolean onConnect(INonBlockingConnection connection) throws IOException {
...
}
public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException {
...
Executor workerpool = srv.getWorkerpool();
...
}
}
type
public abstract Class type
- Default:
- java.lang.Object.class