public boolean accept(ChannelMessage msg);
+ @Override
public boolean equals(Object listener);
+ @Override
public int hashCode();
}
public interface MultiPointSender extends DataSender
{
public void sendMessage(Member[] destination, ChannelMessage data) throws ChannelException;
- public void setRxBufSize(int size);
- public void setTxBufSize(int size);
public void setMaxRetryAttempts(int attempts);
public void setDirectBuffer(boolean directBuf);
public void add(Member member);
final String lext = ext;
if (dir.isDirectory()) {
names = dir.list(new FilenameFilter() {
+ @Override
public boolean accept(File d, String name) {
if (name.endsWith(lext)) {
return true;
* @deprecated since 5.2 because multiple variables can share the
* same slot, use getLocalVariable(int index, int pc) instead.
*/
+ @java.lang.Deprecated
public final LocalVariable getLocalVariable( int index ) {
for (int i = 0; i < local_variable_table_length; i++) {
if (local_variable_table[i].getIndex() == index) {
* Return the namespace URI that will be applied to all Rule instances
* created from this RuleSet.
*/
+ @Override
public String getNamespaceURI() {
return (this.namespaceURI);
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
+ @Override
public abstract void addRuleInstances(Digester digester);
* Return the Digester instance with which this Rules instance is
* associated.
*/
+ @Override
public Digester getDigester() {
return (this.digester);
*
* @param digester The newly associated Digester instance
*/
+ @Override
public void setDigester(Digester digester) {
this.digester = digester;
* Return the namespace URI that will be applied to all subsequently
* added <code>Rule</code> objects.
*/
+ @Override
public String getNamespaceURI() {
return (this.namespaceURI);
* subsequently added rules, or <code>null</code> for matching
* regardless of the current namespace URI
*/
+ @Override
public void setNamespaceURI(String namespaceURI) {
this.namespaceURI = namespaceURI;
* @param pattern Nesting pattern to be matched for this Rule
* @param rule Rule instance to be registered
*/
+ @Override
public void add(String pattern, Rule rule) {
// to help users who accidently add '/' to the end of their patterns
int patternLength = pattern.length();
/**
* Clear all existing Rule instance registrations.
*/
+ @Override
public void clear() {
cache.clear();
* or <code>null</code> to match regardless of namespace URI
* @param pattern Nesting pattern to be matched
*/
+ @Override
public List<Rule> match(String namespaceURI, String pattern) {
// List rulesList = (List) this.cache.get(pattern);
* in the order originally registered through the <code>add()</code>
* method.
*/
+ @Override
public List<Rule> rules() {
return (this.rules);
// --------------------------------------------------------- Properties
/** Gets digester using these Rules */
+ @Override
public Digester getDigester() {
return wrappedRules.getDigester();
}
/** Sets digester using these Rules */
+ @Override
public void setDigester(Digester digester) {
wrappedRules.setDigester(digester);
Iterator<Rule> it = defaultRules.iterator();
}
/** Gets namespace to apply to Rule's added */
+ @Override
public String getNamespaceURI() {
return wrappedRules.getNamespaceURI();
}
/** Sets namespace to apply to Rule's added subsequently */
+ @Override
public void setNamespaceURI(String namespaceURI) {
wrappedRules.setNamespaceURI(namespaceURI);
}
* If wrapped implementation returns any matches return those.
* Otherwise, return default matches.
*/
+ @Override
public List<Rule> match(String namespaceURI, String pattern) {
List<Rule> matches = wrappedRules.match(namespaceURI, pattern);
if (matches == null || matches.isEmpty()) {
}
/** Gets all rules */
+ @Override
public List<Rule> rules() {
return allRules;
}
/** Clears all Rule's */
+ @Override
public void clear() {
wrappedRules.clear();
allRules.clear();
* Adds a Rule to be fired on given pattern.
* Pattern matching is delegated to wrapped implementation.
*/
+ @Override
public void add(String pattern, Rule rule) {
wrappedRules.add(pattern, rule);
allRules.add(rule);
* Returns the items content type, or null.
* @return Content type, if known, or null.
*/
+ @Override
public String getContentType() {
return contentType;
}
* Returns the items field name.
* @return Field name.
*/
+ @Override
public String getFieldName() {
return fieldName;
}
* use the file name anyways, catch the exception and use
* InvalidFileNameException#getName().
*/
+ @Override
public String getName() {
return Streams.checkFileName(name);
}
* @return True, if the item is a form field,
* otherwise false.
*/
+ @Override
public boolean isFormField() {
return formField;
}
* @return Opened input stream.
* @throws IOException An I/O error occurred.
*/
+ @Override
public InputStream openStream() throws IOException {
if (opened) {
throw new IllegalStateException(
* Returns the file item headers.
* @return The items header object
*/
+ @Override
public FileItemHeaders getHeaders() {
return headers;
}
* Sets the file item headers.
* @param pHeaders The items header object
*/
+ @Override
public void setHeaders(FileItemHeaders pHeaders) {
headers = pHeaders;
}
* @return True, if one or more additional file items
* are available, otherwise false.
*/
+ @Override
public boolean hasNext() throws FileUploadException, IOException {
if (eof) {
return false;
* @return FileItemStream instance, which provides
* access to the next file item.
*/
+ @Override
public FileItemStream next() throws FileUploadException, IOException {
if (eof || (!itemValid && !hasNext())) {
throw new NoSuchElementException();
* Returns, whether the stream is closed.
* @return True, if the stream is closed, otherwise false.
*/
+ @Override
public boolean isClosed() {
return closed;
}
*
* @throws IOException if an error occurs.
*/
+ @Override
public InputStream getInputStream()
throws IOException {
if (!isInMemory()) {
* @return The content type passed by the agent or <code>null</code> if
* not defined.
*/
+ @Override
public String getContentType() {
return contentType;
}
* a security attack. If you intend to use the file name anyways, catch
* the exception and use InvalidFileNameException#getName().
*/
+ @Override
public String getName() {
return Streams.checkFileName(fileName);
}
* @return <code>true</code> if the file contents will be read
* from memory; <code>false</code> otherwise.
*/
+ @Override
public boolean isInMemory() {
if (cachedContent != null) {
return true;
*
* @return The size of the file, in bytes.
*/
+ @Override
public long getSize() {
if (size >= 0) {
return size;
*
* @return The contents of the file as an array of bytes.
*/
+ @Override
public byte[] get() {
if (isInMemory()) {
if (cachedContent == null) {
* @throws UnsupportedEncodingException if the requested character
* encoding is not available.
*/
+ @Override
public String getString(final String charset)
throws UnsupportedEncodingException {
return new String(get(), charset);
*
* TODO Consider making this method throw UnsupportedEncodingException.
*/
+ @Override
public String getString() {
byte[] rawdata = get();
String charset = getCharSet();
*
* @throws Exception if an error occurs.
*/
+ @Override
public void write(File file) throws Exception {
if (isInMemory()) {
FileOutputStream fout = null;
* collected, this method can be used to ensure that this is done at an
* earlier time, thus preserving system resources.
*/
+ @Override
public void delete() {
cachedContent = null;
File outputFile = getStoreLocation();
* @see #setFieldName(java.lang.String)
*
*/
+ @Override
public String getFieldName() {
return fieldName;
}
* @see #getFieldName()
*
*/
+ @Override
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
* @see #setFormField(boolean)
*
*/
+ @Override
public boolean isFormField() {
return isFormField;
}
* @see #isFormField()
*
*/
+ @Override
public void setFormField(boolean state) {
isFormField = state;
}
*
* @throws IOException if an error occurs.
*/
+ @Override
public OutputStream getOutputStream()
throws IOException {
if (dfos == null) {
* Returns the file item headers.
* @return The file items headers.
*/
+ @Override
public FileItemHeaders getHeaders() {
return headers;
}
* Sets the file item headers.
* @param pHeaders The file items headers.
*/
+ @Override
public void setHeaders(FileItemHeaders pHeaders) {
headers = pHeaders;
}
*
* @return The newly created file item.
*/
+ @Override
public FileItem createItem(String fieldName, String contentType,
boolean isFormField, String fileName) {
DiskFileItem result = new DiskFileItem(fieldName, contentType,
*
* @return The character encoding for the request.
*/
+ @Override
public String getCharacterEncoding() {
return request.getCharacterEncoding();
}
*
* @return The content type of the request.
*/
+ @Override
public String getContentType() {
return request.getContentType();
}
*
* @return The content length of the request.
*/
+ @Override
public int getContentLength() {
return request.getContentLength();
}
*
* @throws IOException if a problem occurs.
*/
+ @Override
public InputStream getInputStream() throws IOException {
return request.getInputStream();
}
*/
private final List<String> headerNameList = new ArrayList<String>();
+ @Override
public String getHeader(String name) {
String nameLower = name.toLowerCase(Locale.ENGLISH);
List<String> headerValueList = headerNameToValueListMap.get(nameLower);
return headerValueList.get(0);
}
+ @Override
public Iterator<String> getHeaderNames() {
return headerNameList.iterator();
}
+ @Override
public Iterator<String> getHeaders(String name) {
String nameLower = name.toLowerCase(Locale.ENGLISH);
List<String> headerValueList = headerNameToValueListMap.get(nameLower);
* @return True, if the stream is closed, otherwise false.
* @throws IOException An I/O error occurred.
*/
+ @Override
public boolean isClosed() throws IOException {
return closed;
}
* includes the name of the attribute in this notification</li>
* </ul>
*/
+ @Override
public boolean isNotificationEnabled(Notification notification) {
if (notification == null)
*
* @since 1.1
*/
+ @Override
public void stop() {
descriptorsByClass = new HashMap<String,ManagedBean>();
descriptors = new HashMap<String,ManagedBean>();
*
* @since 1.1
*/
+ @Override
public List<ObjectName> loadMBeans( Object source, ClassLoader cl )
throws Exception
{
*
* @param source
*/
+ @Override
public void loadMetadata(Object source ) throws Exception {
loadDescriptors( null, source, null );
}
*
* @since 1.1
*/
+ @Override
public void registerComponent(Object bean, String oname, String type)
throws Exception
{
*
* @since 1.1
*/
+ @Override
public void unregisterComponent( String oname ) {
try {
unregisterComponent(new ObjectName(oname));
* @throws Exception
* @since 1.1
*/
+ @Override
public void invoke(List<ObjectName> mbeans, String operation,
boolean failFirst ) throws Exception {
if( mbeans==null ) {
* @return An unique id for the domain:name combination
* @since 1.1
*/
+ @Override
public synchronized int getId( String domain, String name) {
if( domain==null) {
domain="";
// -------------------- Registration --------------------
+ @Override
public ObjectName preRegister(MBeanServer server,
ObjectName name) throws Exception
{
return name;
}
+ @Override
public void postRegister(Boolean registrationDone) {
}
+ @Override
public void preDeregister() throws Exception {
}
+ @Override
public void postDeregister() {
}
this.type=type;
}
+ @Override
public void setSource( Object source ) {
this.source=source;
}
+ @Override
public Object getSource() {
return source;
}
/** Return the list of mbeans created by this source.
* It can be used to implement runtime services.
*/
+ @Override
public List<ObjectName> getMBeans() {
return mbeans;
}
registry.invoke(mbeans, "stop", false);
}
+ @Override
public void init() throws Exception {
if( mbeans==null) execute();
if( registry==null ) registry=Registry.getRegistry(null, null);
registry.invoke(mbeans, "destroy", false);
}
+ @Override
public void load() throws Exception {
execute(); // backward compat
}
/** Store the mbeans.
* XXX add a background thread to store it periodically
*/
+ @Override
public void save() {
// XXX customize no often than ( based on standard descriptor ), etc.
// It doesn't work very well if we call this on each set att -