Package septogeddon.pluginquery.http
Class HTTPContext
java.lang.Object
septogeddon.pluginquery.http.HTTPContext
Basically a HTTP Protocol Manager for PluginQuery
- Author:
- Thito Yalasatria Sunarya
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchRequest(ProtocolRequest request, ProtocolClient client) Dispatch the request to all listenersstatic HTTPContextGet the default HTTP contextGet method by namevoidregisterListener(ListenerPriority priority, ProtocolListener listener) Register a listenervoidregisterMethod(ProtocolMethod method) Register a methodvoidunregisterListener(ProtocolListener listener) Unregister a listener
-
Constructor Details
-
HTTPContext
public HTTPContext()
-
-
Method Details
-
getContext
Get the default HTTP context- Returns:
- HTTPContext instance
-
registerMethod
Register a method- Parameters:
method- method type- Throws:
IllegalArgumentException- if the ProtocolMethod has different context- See Also:
-
getMethod
Get method by name- Parameters:
name- the method name- Returns:
- the method instance
-
registerListener
Register a listener- Parameters:
priority- the listener prioritylistener- the listener
-
unregisterListener
Unregister a listener- Parameters:
listener- the listener
-
dispatchRequest
Dispatch the request to all listeners- Parameters:
request- the requestclient- the client
-