public void initialize() throws SoapFault { super.initialize(); // // find pullpoint resource type so we can create instances of it // in createPullPoint() // ResourceManager manager = getResource().getResourceManager(); _pullPointPath = manager.getResourceContextPath(PullPoint.class); if (_pullPointPath == null) throw new RuntimeException("No PullPoint endpoint deployed"); } }
public void initializeCompleted() throws SoapFault { Persistence persistence = getPersistence(); // // if the capability defines a persistence mechanism, we // should ask it to reload any saved data // if (persistence != null) { ResourceManager manager = getResource().getResourceManager(); persistence.setResourceManager(manager); persistence.reload(); } }
public void resourceRemoved(EndpointReference epr) throws SoapFault { if (!isAdvertised(epr)) return; Element payload = XmlUtils.createElement(MuwsConstants.DESTROY_NOTIFICATION_QNAME); sendMessage(epr, MuwsConstants.ADV_ME_DESTRUCTION_TOPIC, WefConstants.DESTROY_SITUATION_QNAME, payload); Resource advertiser = getResource(); if (advertiser.hasBeenShutdown()) advertiser.getResourceManager().removeListener(this); }
public void initializeCompleted() throws SoapFault { super.initializeCompleted(); Resource resource = getResource(); // // this allows the advertisement capability to hear about // all resource lifecycle events that happen in the application // ResourceManager manager = resource.getResourceManager(); manager.addListener(this); // // initialize the advertisement topics // NotificationProducer wsn = (NotificationProducer)resource.getCapability(WsnConstants.PRODUCER_URI); wsn.addTopic(MuwsConstants.ADV_ME_CREATION_TOPIC); wsn.addTopic(MuwsConstants.ADV_ME_DESTRUCTION_TOPIC); // // create subscriptions for all event consumer that are going to // receive notifications from the above topics // subscribeInitialConsumer(); }
public EndpointReference createPullPoint() throws UnableToCreatePullPointFault ResourceManager manager = getResource().getResourceManager();