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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatchRequest
(ProtocolRequest request, ProtocolClient client) Dispatch the request to all listenersstatic HTTPContext
Get the default HTTP contextGet method by namevoid
registerListener
(ListenerPriority priority, ProtocolListener listener) Register a listenervoid
registerMethod
(ProtocolMethod method) Register a methodvoid
unregisterListener
(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
-