private CStoreForwardTask createTask(final Association as) { ApplicationEntity localAE = retrieveCtx.getLocalApplicationEntity(); Association storeas = openAssociation(as, localAE); final CStoreForwardTask task = new CStoreForwardTask(retrieveCtx, storeas); forwardTasks.put(as, task); as.addAssociationListener( new AssociationListener() { @Override public void onClose(Association association) { task.onStore(null); forwardTasks.remove(as); } }); if (storeas != null) { retrieveCtx.incrementPendingCStoreForward(); localAE.getDevice().execute(task); } return task; }
@GET @Path("/whoami") @Produces(MediaType.TEXT_HTML) public Response whoami() throws ConfigurationException { HttpSource source = new HttpSource(request); ApplicationEntity ae = hostAECache.findAE(source); Device callerDevice = ae.getDevice(); return Response.ok( "<div>Calling Device: <br>Host:" + request.getRemoteHost() + "<br>AETitle: " + ae.getAETitle() + "<br>Device Name: " + callerDevice.getDeviceName() + "</div>") .build(); }
public MoveSCU(ApplicationEntity ae) { this.ae = ae; this.device = ae.getDevice(); }