/** * Constructor for the <code>RequestEntity</code> object. This is * used to create a request that contains all the parts sent by * the client, including the headers and the request body. Each of * the request elements are accessible through this object in a * convenient manner, all parts and parameters, as well as cookies * can be accessed and used without much effort. * * @param observer this is the observer used to monitor events * @param entity this is the entity that was sent by the client */ public RequestEntity(ResponseObserver observer, Entity entity) { this.certificate = new RequestCertificate(observer, entity); this.builder = new QueryBuilder(this, entity); this.channel = entity.getChannel(); this.header = entity.getHeader(); this.body = entity.getBody(); this.time = entity.getTime(); }
/** * Constructor for the <code>ResponseBuffer</code> object. This will * create a buffering output stream which will flush data to the * underlying transport provided with the entity. All I/O events * are reported to the monitor so the server can process other * requests within the pipeline when the current one is finished. * * @param support this is used to determine the response semantics * @param entity this is used to acquire the underlying transport * @param monitor this is used to report I/O events to the kernel */ public ResponseBuffer(Response response, Conversation support, Entity entity, Monitor monitor) { this(response, support, entity.getChannel(), monitor); }
CopyOnWriteArrayList<Entity> entities = new CopyOnWriteArrayList<Entity>(); public void deleteEntities() { for(Entity entity: entities){ Body body = entity.getBody(); if (body != null) { EntityData data = (EntityData) body.getUserData(); if (data.isFlaggedForDelete()) { final Array<JointEdge> list = body.getJointList(); //delete all joints attached while (list.size > 0) { myWorld.getWorld().destroyJoint(list.get(0).joint); } //nullify everything, remove the entity from entities and destroy the body body.setUserData(null); myWorld.getWorld().destroyBody(body); entities.remove(entity); body = null; } } } }
/** * Constructor for the <code>QueryBuilder</code> object. This will * create an object that can be used to construct a single query * from the multiple sources of data within the request entity. * * @param request this is the request to build a query for * @param entity this is the entity that contains the data */ public QueryBuilder(Request request, Entity entity) { this.header = entity.getHeader(); this.request = request; }
/** * Constructor for the <code>ResponseBuffer</code> object. This will * create a buffering output stream which will flush data to the * underlying transport provided with the entity. All I/O events * are reported to the monitor so the server can process other * requests within the pipeline when the current one is finished. * * @param observer this is used to notify of response completion * @param response this is the response header for this buffer * @param support this is used to determine the response semantics * @param entity this is used to acquire the underlying transport */ public ResponseBuffer(BodyObserver observer, Response response, Conversation support, Entity entity) { this(observer, response, support, entity.getChannel()); }
/** * Constructor for the <code>QueryBuilder</code> object. This will * create an object that can be used to construct a single query * from the multiple sources of data within the request entity. * * @param request this is the request to build a query for * @param entity this is the entity that contains the data */ public QueryBuilder(Request request, Entity entity) { this.header = entity.getHeader(); this.request = request; }
/** * Constructor for the <code>RequestEntity</code> object. This is * used to create a request that contains all the parts sent by * the client, including the headers and the request body. Each of * the request elements are accessible through this object in a * convenient manner, all parts and parameters, as well as cookies * can be accessed and used without much effort. * * @param entity this is the entity that was sent by the client * @param monitor this is the monitor used to monitor events */ public RequestEntity(Entity entity, Monitor monitor) { this.certificate = new RequestCertificate(entity, monitor); this.builder = new QueryBuilder(this, entity); this.channel = entity.getChannel(); this.header = entity.getHeader(); this.body = entity.getBody(); this.time = entity.getTime(); }
/** * Constructor for the <code>ResponseBuffer</code> object. This will * create a buffering output stream which will flush data to the * underlying transport provided with the entity. All I/O events * are reported to the monitor so the server can process other * requests within the pipeline when the current one is finished. * * @param observer this is used to notify of response completion * @param response this is the response header for this buffer * @param support this is used to determine the response semantics * @param entity this is used to acquire the underlying transport */ public ResponseBuffer(BodyObserver observer, Response response, Conversation support, Entity entity) { this(observer, response, support, entity.getChannel()); }
/** * Constructor for the <code>QueryBuilder</code> object. This will * create an object that can be used to construct a single query * from the multiple sources of data within the request entity. * * @param request this is the request to build a query for * @param entity this is the entity that contains the data */ public QueryBuilder(Request request, Entity entity) { this.header = entity.getHeader(); this.request = request; }
/** * Constructor for the <code>RequestEntity</code> object. This is * used to create a request that contains all the parts sent by * the client, including the headers and the request body. Each of * the request elements are accessible through this object in a * convenient manner, all parts and parameters, as well as cookies * can be accessed and used without much effort. * * @param observer this is the observer used to monitor events * @param entity this is the entity that was sent by the client */ public RequestEntity(ResponseObserver observer, Entity entity) { this.certificate = new RequestCertificate(observer, entity); this.builder = new QueryBuilder(this, entity); this.channel = entity.getChannel(); this.header = entity.getHeader(); this.body = entity.getBody(); this.time = entity.getTime(); }
/** * Constructor for the <code>Challenge</code> object. This is * basically a wrapper for the raw certificate challenge that * will enforce some of the workflow required by HTTPS. * * @param observer this observer used to track the transaction * @param entity this entity containing the request data */ public Challenge(BodyObserver observer, Entity entity) { this.channel = entity.getChannel(); this.certificate = channel.getCertificate(); this.observer = observer; }
/** * Constructor for the <code>Challenge</code> object. This is * basically a wrapper for the raw certificate challenge that * will enforce some of the workflow required by HTTPS. * * @param entity this entity containing the request data * @param monitor this monitor used to track the transaction */ public Challenge(Entity entity, Monitor monitor) { this.channel = entity.getChannel(); this.certificate = channel.getCertificate(); this.monitor = monitor; }
/** * Constructor for the <code>Challenge</code> object. This is * basically a wrapper for the raw certificate challenge that * will enforce some of the workflow required by HTTPS. * * @param observer this observer used to track the transaction * @param entity this entity containing the request data */ public Challenge(BodyObserver observer, Entity entity) { this.channel = entity.getChannel(); this.certificate = channel.getCertificate(); this.observer = observer; }
/** * Constructor for the <code>ResponseObserver</code> object. This * is used to create an observer using a HTTP request entity and an * initiator which is used to reprocess a channel if there was a * successful deliver of a response. * * @param controller the controller used to process channels * @param entity this is the entity associated with the channel */ public ResponseObserver(Controller controller, Entity entity) { this.timer = new Timer(MILLISECONDS); this.committed = new AtomicBoolean(); this.closed = new AtomicBoolean(); this.error = new AtomicBoolean(); this.channel = entity.getChannel(); this.trace = channel.getTrace(); this.controller = controller; }
/** * Constructor for the <code>ResponseObserver</code> object. This * is used to create an observer using a HTTP request entity and an * initiator which is used to reprocess a channel if there was a * successful deliver of a response. * * @param controller the controller used to process channels * @param entity this is the entity associated with the channel */ public ResponseObserver(Controller controller, Entity entity) { this.timer = new Timer(MILLISECONDS); this.committed = new AtomicBoolean(); this.closed = new AtomicBoolean(); this.error = new AtomicBoolean(); this.channel = entity.getChannel(); this.trace = channel.getTrace(); this.controller = controller; }
/** * Constructor for the <code>RequestCertificate</code>. This is * used to create a wrapper for the raw SSL certificate that * is provided by the underlying SSL session. * * @param observer the observer used to observe the transaction * @param entity the request entity containing the data */ public RequestCertificate(BodyObserver observer, Entity entity) { this.challenge = new Challenge(observer, entity); this.channel = entity.getChannel(); this.certificate = channel.getCertificate(); }
/** * Constructor for the <code>RequestCertificate</code>. This is * used to create a wrapper for the raw SSL certificate that * is provided by the underlying SSL session. * * @param observer the observer used to observe the transaction * @param entity the request entity containing the data */ public RequestCertificate(BodyObserver observer, Entity entity) { this.challenge = new Challenge(observer, entity); this.channel = entity.getChannel(); this.certificate = channel.getCertificate(); }
/** * Constructor for the <code>RequestCertificate</code>. This is * used to create a wrapper for the raw SSL certificate that * is provided by the underlying SSL session. * * @param entity the request entity containing the data * @param monitor the monitor used to monitor the transaction */ public RequestCertificate(Entity entity, Monitor monitor) { this.challenge = new Challenge(entity, monitor); this.channel = entity.getChannel(); this.certificate = channel.getCertificate(); }
/** * Constructor for the <code>FlushMonitor</code> object. This is * used to create a monitor using a HTTP request entity and an * initiator which is used to reprocess a channel if there was a * successful deliver of a response. * * @param reactor this is the reactor used to process channels * @param entity this is the entity associated with the channel */ public FlushMonitor(Initiator reactor, Entity entity) { this.timer = new Timer(MILLISECONDS); this.channel = entity.getChannel(); this.trace = channel.getTrace(); this.reactor = reactor; }
/** * Constructor for the <code>RequestDispatcher</code> object. This * creates a request and response object using the provided entity, * these can then be passed to the container to handle it. * * @param container this is the container to handle the request * @param controller the controller used to handle the next request * @param entity this contains the current request entity */ public RequestDispatcher(Container container, Controller controller, Entity entity) { this.observer = new ResponseObserver(controller, entity); this.request = new RequestEntity(observer, entity); this.response = new ResponseEntity(observer, request, entity); this.channel = entity.getChannel(); this.trace = channel.getTrace(); this.container = container; }