private boolean isPresentationRequest(HTTPRequest httpReq) { if (!httpReq.isGetRequest()) return false; String urlPath = httpReq.getURI(); if (urlPath == null) return false; String presentationURL = getPresentationURL(); if (presentationURL == null) return false; return urlPath.startsWith(presentationURL); }
public void httpRequestRecieved(HTTPRequest httpReq) { if (Debug.isOn() == true) httpReq.print(); if (hasPresentationListener() && isPresentationRequest(httpReq)) { PresentationListener listener = getPresentationListener(); listener.httpRequestRecieved(httpReq); return; } if (httpReq.isGetRequest() == true || httpReq.isHeadRequest() == true) { httpGetRequestRecieved(httpReq); return; } if (httpReq.isPostRequest() == true) { httpPostRequestRecieved(httpReq); return; } if (httpReq.isSubscribeRequest() == true || httpReq.isUnsubscribeRequest() == true) { SubscriptionRequest subReq = new SubscriptionRequest(httpReq); deviceEventSubscriptionRecieved(subReq); return; } httpReq.returnBadRequest(); }
private boolean isPresentationRequest(HTTPRequest httpReq) { if (!httpReq.isGetRequest()) return false; String urlPath = httpReq.getURI(); if (urlPath == null) return false; String presentationURL = getPresentationURL(); if (presentationURL == null) return false; return urlPath.startsWith(presentationURL); }
private boolean isPresentationRequest(HTTPRequest httpReq) { if (!httpReq.isGetRequest()) return false; String urlPath = httpReq.getURI(); if (urlPath == null) return false; String presentationURL = getPresentationURL(); if (presentationURL == null) return false; return urlPath.startsWith(presentationURL); }
public void httpRequestRecieved(HTTPRequest httpReq) { if (Debug.isOn() == true) httpReq.print(); if (hasPresentationListener() && isPresentationRequest(httpReq)) { PresentationListener listener = getPresentationListener(); listener.httpRequestRecieved(httpReq); return; } if (httpReq.isGetRequest() == true || httpReq.isHeadRequest() == true) { httpGetRequestRecieved(httpReq); return; } if (httpReq.isPostRequest() == true) { httpPostRequestRecieved(httpReq); return; } if (httpReq.isSubscribeRequest() == true || httpReq.isUnsubscribeRequest() == true) { SubscriptionRequest subReq = new SubscriptionRequest(httpReq); deviceEventSubscriptionRecieved(subReq); return; } httpReq.returnBadRequest(); }
public void httpRequestRecieved(HTTPRequest httpReq) { if (Debug.isOn() == true) httpReq.print(); if (hasPresentationListener() && isPresentationRequest(httpReq)) { PresentationListener listener = getPresentationListener(); listener.httpRequestRecieved(httpReq); return; } if (httpReq.isGetRequest() == true || httpReq.isHeadRequest() == true) { httpGetRequestRecieved(httpReq); return; } if (httpReq.isPostRequest() == true) { httpPostRequestRecieved(httpReq); return; } if (httpReq.isSubscribeRequest() == true || httpReq.isUnsubscribeRequest() == true) { SubscriptionRequest subReq = new SubscriptionRequest(httpReq); deviceEventSubscriptionRecieved(subReq); return; } httpReq.returnBadRequest(); }